Question
In this lab, we will practice input and output commands, use of variables, and basic arithmetic. We will write a small program for The Lincoln
In this lab, we will practice input and output commands, use of variables, and basic arithmetic.
We will write a small program for The Lincoln Center Bookstore to take an order from a customer, calculate how much to charge a customer based on his/her order, and display a receipt. The store sells only three books, designated by their authors: Cervantes ($41.25 each), Homer ($15.85 each), and Shakespeare ($30.50 each).
Your program is to work as follows:
1) Display a welcome message (e.g., Welcome to the Lincoln Center Bookstore!)
2) Prompt the user for his/her first name
3) Prompt the user to input the number of books by Cervantes s/he wants
4) Prompt the user to input the number of books by Homer s/he wants
5) Prompt the user to input the number of books by Shakespeare s/he wants
6) Compute the total amount due, including an 10% sales tax
7) Display amount due
8) Ask the user how much money s/he will pay
9) Display a receipt listing the name of the user, the quantity of each item ordered, the total cost of the order, and the amount the user will have left after paying
Execution of the Python program should appear roughly as follows (with bold text being user input):
$ python LCBooks.py
Welcome to the Lincoln Center Bookstore
Enter your first name: Irene
Enter number of Cervantes books: 2
Enter number of Homer books: 0
Enter number of Shakespeare book: 3
Total cost of order is: $191.40
How much money will you pay? 200.25
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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