Assignment 10 – Café Invoice
ALIGNMENT: This assignment provides practice with using a repetition structure to get multiple
ASSIGNMENT: The Simple Café has a simple menu (at right). The user would like a program to help with invoicing each order. The invoice should show each item ordered with the cost, the subtotal, the tax charges (at 8.3%) and the total bill (subtotal + tax):
He would like it easy for the wait staff to enter the order as a single input string – such as DFI if the patron ordered a chicken sandwich with a side and a cup of coffee. Here is a sample execution:
Write a Python program in which you:
Save your file with as “CIS156_10_CafeInvoice_YourLastName.py”
Print the project tile on the first Print the next line showing your name as the developer, followed by a blank line (remember you can use \n). Then provide a description of what the program does.
The user should be prompted to enter a sring containing the order (e.g. ACFFGG)
TIP: Use a repetition loop (for) to go through each letter of the input, g.:
for xyz in myString:
will loop through each character of the myString variable. Then use a nested if…elif…else structure to add the appropriate item to a string for the invoice (remember to add new line characters), and increment the subtotal appropriately. For example:
elif i == "C":
invoice += "\nHot Dog........... $1.75"
subtotal += 1.75
After the loop, print the invoice string, display the subtotal, calculate and display the tax (8.3%) and the total (subtotal + tax)
Add a string showing the date and time. Google “Python date and time”. BTW, you have to “import datetime” to use the “now” property and the suggested strftime( ) method to
You may not use any features not yet covered in this course or discussed above, including lists, tuples, functions.
SUBMIT: Upload your Python (.py) file to Canvas in the Assignment 10 area.
GRADING (2 Points)
1 point for cSLO1 – Write Python programs that process user input and display formatted
1 point for cSLO2 – Use control structures (in this case, for repetition and if conditional structures)
DescriptionIn this final assignment, the students will demonstrate their ability to apply two majorconstructs of the C programming language – Fu
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of