# A time traveler has suddenly appeared in your classroom! # Prompt the user for the year that they are from # and greet our strange visitor with a different message # if he is from the distant past (before 1990), # the present era (1990-2021) or from the future (beyond 2022). year == int.input ("Greetings! What is your year of origin? ')) if year <= 1900 elif: print ('Wow, that's the past!') print ("Far out, that's the future!!) 1900 && year <= 2022: print ("That's totally the present!") elif year An Example Output is (user inputs are in bold italics): Greetings! What is your year of origin? 1950 Wow, that's the past! Greetings! What is your year of origin? 2007 That's totally the preset! Greetings! What is your year of origin? 2030 Far out, that's the future!!

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 10PE
icon
Related questions
Question

Fix the problems in the following program

PYTHON PROGRAMING ONLY

 

 

# A time traveler has suddenly appeared in your classroom!
#Prompt the user for the year that they are from
# and greet our strange visitor with a different message
# if he is from the distant past (before 1990),
# the present era (1990-2021) or from the future (beyond 2022).
year == int.input ("Greetings! What is your year of origin? '))
if year <= 1900
print ('Wow, that's the past!')
elif:
print ("Far out, that's the future!!)
elif year 1900 && year <= 2022:
print ("That's totally the present!")
An Example Output is (user inputs are in bold italics):
Greetings! What is your year of origin? 1950
Wow, that's the past!
Greetings! What is your year of origin? 2007
That's totally the preset!
Greetings! What is your year of origin? 2030
Far out, that's the future!!
Transcribed Image Text:# A time traveler has suddenly appeared in your classroom! #Prompt the user for the year that they are from # and greet our strange visitor with a different message # if he is from the distant past (before 1990), # the present era (1990-2021) or from the future (beyond 2022). year == int.input ("Greetings! What is your year of origin? ')) if year <= 1900 print ('Wow, that's the past!') elif: print ("Far out, that's the future!!) elif year 1900 && year <= 2022: print ("That's totally the present!") An Example Output is (user inputs are in bold italics): Greetings! What is your year of origin? 1950 Wow, that's the past! Greetings! What is your year of origin? 2007 That's totally the preset! Greetings! What is your year of origin? 2030 Far out, that's the future!!
Expert Solution
steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,