Question

Write multiple if statements:
If carYear is before 1967, put "Probably has few safety features.\n" to output.

If after 1970, put "Probably has head rests.\n" to output.

If after 1992, put "Probably has electronic stability control.\n" to output.

If after 2000, put "Probably has tire-pressure monitor.\n" to output.

Ex: If carYear is 1995, then output is:

Probably has head rests.
Probably has electronic stability control.

Answers

There are no human answers yet.
Answered by GPT 3.5
if carYear < 1967:
print("Probably has few safety features.\n")
if carYear > 1970:
print("Probably has head rests.\n")
if carYear > 1992:
print("Probably has electronic stability control.\n")
if carYear > 2000:
print("Probably has tire-pressure monitor.\n")

Related Questions