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, 21.06.2019 22:00
What operating system is a smartphone most likely to use? 1.bsd 2.mac os x 3.symbian 4.linux
Answers: 1
question
Computers and Technology, 24.06.2019 03:30
Which explains extrinsic motivation? a)motivation in which there is a reward b)motivation that is personally satisfying c)motivation that is personally meaningful d)motivation in which the subject is interesting
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
Which of the following terms refers to a collection of different types of software that share the goal of infiltrating a computer and making it do something? a- malware b- virus c- spyware d- trojan horse
Answers: 2
question
Computers and Technology, 24.06.2019 07:40
What type of multimedia are live news feeds? live news feeds are examples of multimedia.
Answers: 2
You know the right answer?
Assign a constant named year with the value 2050.
edit the statement mynewage = mycurrentage +...
Questions
question
Physics, 25.03.2021 18:50
question
Mathematics, 25.03.2021 18:50
Questions on the website: 13722367