Question: D Write a python program that asks the user for the age and print the appropriate message according to the following 0-18 print you are
D Write a python program that asks the user for the age and print the appropriate message according to the following 0-18 print you are still a dd 19.21: print "You are a young adult. 22-65 print "You are an adult". Otherwise, print "You are a senior" Any invalid input or if the age is less than 0 or greater than 120 print "Error, invalid age". Note: Allow the user to try several runs (By running the program multiple times) during the same session Hint, you need to use the while loop statement Run samples and Examples a) Input: -5 Output: Error, invalid age Do you want to try again (Yes or NO) No Goodbye b) Input: 12 Output: You are still a kid Do you want to try again (Yes or NO) Yes Input: 45 Output: You are an adult Do you want to try again (Yes or NO) No Goodbye c) Input: 23 Output: You are an adult Do you want to try again (Yes or NO) No Goodbye
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
