# 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!!

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education