subject

Assign a constant named year with the value 2050.
edit the statement mynewage = mycurrentage + (2050 − currentyear) so it uses the constant named year.
edit the statement print("i will be" + str(mynewage) + "in 2050.") so it uses the constant named year.
execute the program and verify that the output is correct.

# this program calculates your age in the year 2050.
# input: none
# output: your current age followed by your age in 2050

mycurrentage = 29
currentyear = 2016

mynewage = mycurrentage + (2050 - currentyear)
print("my current age is " + str(mycurrentage))
print("i will be " + str(mynewage) + " in 2050.")

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:20
Octothorpe is another name for what common computer keyboard symbol?
Answers: 1
question
Computers and Technology, 23.06.2019 09:20
How to print: number is equal to: 1 and it is odd number number is equal to: 2 and it is even number number is equal to: 3 and it is odd number number is equal to: 4 and it is even number in the console using java using 1 if statement, 1 while loop, 1 else loop also using % to check odds and evens
Answers: 3
question
Computers and Technology, 23.06.2019 18:50
Ais a picture icon that is a direct link to a file or folder
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
Anul 2017 tocmai s-a încheiat, suntem trişti deoarece era număr prim, însă avem şi o veste bună, anul 2018 este produs de două numere prime, 2 şi 1009. dorel, un adevărat colecţionar de numere prime, şi-a pus întrebarea: “câte numere dintr-un interval [a,b] se pot scrie ca produs de două numere prime? “.
Answers: 1
You know the right answer?
Assign a constant named year with the value 2050.
edit the statement mynewage = mycurrentage +...
Questions
question
Mathematics, 09.09.2021 19:10
question
Mathematics, 09.09.2021 19:10
question
Mathematics, 09.09.2021 19:10
question
History, 09.09.2021 19:10
question
Mathematics, 09.09.2021 19:10
Questions on the website: 13722359