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")
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 2 images
- "Type" doesn't specify a variable. Variables have data types. How can this idea explain any variable?arrow_forwardExtra tutorial : Refer to the "Guess the fruit" example. As a programmer, suggest strategies so your output prediction is highly accurate ? Determine other similar application in healthcare ? Apple B Apple CS Apple G1 Apple G2 Apple G3 Apple GS Apple PL Apple RY2 Apricot Avocado Avocado R Banana Banana LF Banana R Carambula Cauliflower Cherry 1 Cherry 2 Chery R Cherry WB Chery WR Eggplant Ginger Root Granadilla Grape B Grape P Grape W Grape W2arrow_forwardAn argument is expressed in English below. Rhys will go to the beach. If Rhys is excited; then Rhys will go to the beach. Rhys is excited. Variable names are assigned to each English phrase as follows: p: Rhys is excited •q: Rhys will go to the beach Is the argument valid? If valid, then indicate which rule is used for the argument. If invalid, then give truth assignments to the variables that prove the argument is invalid. Pick 4. Check Nextarrow_forward
- Months Given the current month X, find out what month it will be after Y months have passed. You may not use the following keywords: if, while, for. $ python month.py 13 It's currently January, in 3 months it will be April. $ python month.py 5 20 It's currently May, in 20 months it will be January. $ python month.py 12 12 It's currently December, in 12 months it will be December.arrow_forwardPython please: If the score is between 90 and 100, the grade is A, and the teacher comment is 'Exceptional work' for 100 only 'Excellent work' for anything other than 100 If the score is between 80 and 89, the grade is B, and the teacher comment is 'Very Good, can do better' If the score is between 70 and 79, the grade is C, and the teacher comment is 'Good, but need to work harder' If the score is between 60 and 69, the grade is D, and there are no teacher comments. If the score is below 60, the grade is F, and the teacher comment is 'Fail, need to appear for a retest' For example if the input (student test score) is 100 the output is The Student grade is A and the teacher comment is 'Exceptional work'arrow_forwardRetype the statements, correcting the syntax error in each print statement. print('Predictions are hard.") print(Especially about the future.) user_num = 5 print('user_num is:' user_num) I am completly new to scripting and this class and do not understand this at all please help and explain!arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education