Ask Question

Write multiple if statements. if car_year is 1969 or earlier, print "few safety features.". if 1970 or later, print "probably has seat belts.". if 1990 or later, print "probably has anti-lock brakes.". if 2000 or later, print "probably has air bags." end each phrase with a period and a newline. ex: car_year = 1995 prints:

+4
Answers (1)
  1. 30 November, 06:30
    0
    Here it is in Python. If you wanted a different language, you should specify that in your question.

    if car_year < 1970:

    print ('few safety features.')

    else:

    print ('probably has seat belts.')

    if car_year > 1989:

    print ('probably has anti-lock brakes.')

    if car_year > 1999:

    print ('probably has air bags.')

    The else statement may seen unnecessary, but it prevents the program from having to perform those conditional checks, when they are 100% going to be false if the car year is 1969 or earlier. You are welcome to remove this if you like.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write multiple if statements. if car_year is 1969 or earlier, print "few safety features.". if 1970 or later, print "probably has seat ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers