Write multiple if statements: If car_year is before 1967, print "Probably has few safety features." (without quotes). If after 1971, print "Probably has seat belts.". If after 1992, print "Probably has electronic stability control.". If after 2002, print "Probably has tire-pressure monitor.". End each phrase with period and newline. Remember that print() automatically adds a newline. Ex: car_year = 1995 prints: Probably has seat belts. Probably has electronic stability control. This is what I got and it was wrong.... car_year = int(input()) carYear = 1995 if(carYear < 1967): print('Probably has few safety features.\n') if(carYear > 1971): print("Probably has seat belts.\n") if(carYear > 1992): print("Probably has electronic stability control.\n") if(carYear > 2002): print("Probably

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter4: Control Structures I (selection)
Section: Chapter Questions
Problem 20PE: The cost of renting a room at a hotel is, say $100.00 per night. For special occasions, such as a...
icon
Related questions
Question

Write multiple if statements: If car_year is before 1967, print "Probably has few safety features." (without quotes). If after 1971, print "Probably has seat belts.". If after 1992, print "Probably has electronic stability control.". If after 2002, print "Probably has tire-pressure monitor.". End each phrase with period and newline. Remember that print() automatically adds a newline. Ex: car_year = 1995 prints: Probably has seat belts. Probably has electronic stability control.

This is what I got and it was wrong....

car_year = int(input())
carYear = 1995
if(carYear < 1967):
print('Probably has few safety features.\n')
if(carYear > 1971):
print("Probably has seat belts.\n")
if(carYear > 1992):
print("Probably has electronic stability control.\n")
if(carYear > 2002):
print("Probably has tire-pressure monitor.\n")

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT