Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting for Governmental and Nonprofit Entities

Authors: Jacqueline L. Reck, James E. Rooks, Suzanne Lowensohn, Daniel Neely

18th edition

1260190080, 1260190083, 978-1259917059

More Books

Students also viewed these Programming questions

Question

=+c) What is/are the response(s)?

Answered: 1 week ago

Question

7.1 Describe the differences between the terms sex and gender.

Answered: 1 week ago