Question: valid_ticket_price Write a shell (text-based) program, called valid ticket _price.py, that prompts the user for their age and, depending on the user's response, prints out

 valid_ticket_price Write a shell (text-based) program, called valid ticket _price.py, that

valid_ticket_price Write a shell (text-based) program, called valid ticket _price.py, that prompts the user for their age and, depending on the user's response, prints out 1 of the 3 sentences below. Children 5 and under are free, so your price is S0. . Seniors 60 and over are 1/2 off, so your price is S10. Your price is $20. The program must validate the input by forcing the user to type in a number between 0 and 100. As long as the user types in numbers less than 0 or greater than 100, the program should print an error and ask the user to type in the age again. Note the program need not worry about the user typing in letters instead of numbers. Below is an example of a confused user using the program. PS CIUsersissiva\Desktop> python valid ticket price.py What is your age? -5 That is not a valid age. Number must be between 0 and 100. What is your age? 823 That is not a valid age. Number must be between 0 and 100. What is your age? 15 Your price is $20 PS CI\Users ssivalDesktop> Submit the file valid_ticket_price.py when done

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!