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 15:00
1. what are the biggest risks when using the public internet as a wide area network (wan) or transport for remote access to your organization’s it infrastructure?
Answers: 2
question
Computers and Technology, 23.06.2019 01:20
Me with this program in c++ ! computers represent color by combining sub-colors red, green, and blue (rgb). each sub-color's value can range from 0 to 255. thus (255, 0, 0) is bright red. (130, 0, 130) is a medium purple. (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (in other word, equal amounts of red, green, blue yield gray).given values for red, green, and blue, remove the gray part. ex: if the input is 130 50 130, the output is: 80 0 80. thus, find the smallest value, and then subtract it from all three values, thus removing the gray.
Answers: 3
question
Computers and Technology, 24.06.2019 00:30
Match the sentence fragment in the first column with the appropriate ending in the second column. a little per favore?
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
The ieee 802.11: defines standards for wireless local area network (wlan) communication protocols. identifies various computers or devices connected to a network. verifies any resource attached to another computer on a network that is different from the computer to which the user is logged on. connects multiple local area networks (lans) and wide area networks (wans).
Answers: 2
You know the right answer?
Assign a constant named year with the value 2050.
edit the statement mynewage = mycurrentage +...
Questions
question
Mathematics, 27.09.2019 02:30