Question
Write a menu driven program in python that does the following:
Write a menu driven program in python that does the following:
This program requires you to create a menu driven program that will generate invoices for veterinary services until the user quits. When a service is selected, display an appropriate message as shown below (you may choose your own appropriate message).
The program needs to display the total of all the services when the user selects the quit option. You need to keep a track of total cost in a variable and keep adding to it every time the user selects a service.
Note: User may quit in the first run of the program. The total in that case should be 0. The following shows sample run of the program. Remember that user inputs are in illustrated in bold italic
Sample run 1:
Chauncey's Vet Services
Exam: 45
Vaccinations: 32
Trim Nails: 8
Bath: 15
Quit
Enter your choice (1-5): 5
Thanks for visiting. Your total for today's visit is $0.0
Sample run 2:
Chauncey's Vet Services
Exam: 45
Vaccinations: 32
Trim Nails: 8
Bath: 15
Quit
Enter your choice (1-5): 7
Wrong choice. Please re-enter.
Sample run 3:
Chauncey's Vet Services
Exam: 45
Vaccinations: 32
Trim Nails: 8
Bath: 15
Quit
Enter your choice (1-5): 1
Your pet is now undergoing an exam.
Chauncey's Vet Services
Exam: 45
Vaccinations: 32
Trim Nails: 8
Bath: 15
Quit
Enter your choice (1-5): 3
Your pet is getting their nails trimmed.
Chauncey's Vet Services
Exam: 45
Vaccinations: 32
Trim Nails: 8
Bath: 15
Quit
Enter your choice (1-5): 5
Thanks for visiting. Your total for today's visit is $53.00
Step by Step Solution
There are 3 Steps involved in it
Step: 1
python code Initialize total cost totalcost 0 Display menu printChaunceys Vet Services print1 Exam 4...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started