Earn Higher Grades With Instant Assignment Help.Ask Question!

Python Programming
(5/5)

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)

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

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)

Attachments:
(5/5)

Related Questions

CSI 1420 Introduction to C Programming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two majorconstructs of the C programming language – Fu

The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

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. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

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

SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

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

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 Sea Ports. Here are the classes and their instance variables we wish to define:

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

Ask This Assignment To Be Done By Our ExpertsGet A+ Grade Solution Guaranteed

expert
joyComputer science
(4/5)
12 Answers Hire Me
expert
Robert DLaw
(4.8/5)
702 Answers Hire Me
expert
Dr Samuel BarberaStatistics
(5/5)
769 Answers Hire Me
expert
Tutor For YouEconomics
(5/5)
674 Answers Hire Me