Answer:
The solution code is written in Python 3.
- carYear = 1995
- if(carYear < 1967):
- print("Probably has few safety features.\\")
- if(carYear > 1970):
- print("Probably has head rests. \\")
- if(carYear > 1991):
- print("Probably has electronic stability control.\\")
- if(carYear > 2002):
- print("Probably has airbags. \\")
Step-by-step explanation:
Firstly, create a variable, carYear to hold the value of year of the car make. (Line 1)
Next, create multiple if statements as required by the question (Line 3-13). The operator "<" denotes "smaller" and therefore carYear < 1967 means any year before 1967. On another hand, the operator ">" denotes "bigger" and therefore carYear > 1970 means any year after 1970.
The print statement in each of the if statements is done using the Python built-in function print(). The "\\" is an escape sequence that create a new line at the end of each printed phrase.