Question: please write a program that allows the user to: 1. Enter the cost of a meal. 2. Specify the level of service: fair, good, or

please write a program that allows the user to:

1. Enter the cost of a meal.

2. Specify the level of service: "fair", "good", or "excellent". Fair service results in a tip amount of 15%, good service equates to a tip of 18%, and excellent service results in a 20% tip.

3. The program must calculate the tip amount and then separately display the tip amount and the total amount (cost of the meal + tip amount).

4. The user should then be asked if they want to try again. If they respond with a 'y', they can enter the cost of the meal and the service level again and it will process their input. If they answer anything other than 'y', the program should thank them for using the program and end.

Scoring: 9/10 points to get this to work as outlined above. 10/10 points for getting it to work as outlined above and for telling the user to try again if they enter anything besides "fair", "good", or "excellent for the service level (don't use formal exception handling mechanisms like try/catch). Be sure to use if/elif/else and a while loop. I also recommend that you convert the user's service level response to lower case using the lower() method.

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!