Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLS HELP ME Write a very descriptive algorithm at the beginning of your program. The algorithm should be written in simple English so that anyone

PLS HELP ME

Write a very descriptive algorithm at the beginning of your program. The algorithm should be written in simple English so that anyone who does not know Python syntax is able to understand your approach [ 15 points].

Write python code below the algorithm and I would also like to see comments throughout your program that explain whats going on in the program as you go.

Assume you are budding food truck owner, creating a receipt generation program.

Part 1)

Write a program that allows the user (the food truck owner) to input the name of 2 food items, the price of each item and the quantity being purchased. Generate an itemized receipt for the food items purchased. When writing the program choose appropriate variable types, variable names and input constrains (i.e. the price of a hotdog can be $2.11 but the number of hotdogs cannot be 1.3!!) [ 25 points]

Part 2)

Extend the program to print out an itemized receipt that adds a mandatory 15% gratuity to the total cost. Output the total cost, the cost of gratuity, and the grand total rounded off to two places of decimals. [ 10 points]

Sample output is shown below:

.image text in transcribed

(hellboy) NSCHNS118:labs troyS python lab3b.py Enter food item name: hotdog Enter item price: 4.756 Enter number of items purchased (only whole numbers allowed) 12 Enter second food item name: fries Enter item price: 4.756666 Enter number of items purchased: (only whole numbers allowed) 20 RECEIPT 12 hotdog 4.756 57.072 20 fries4.756666 S 95.13332 Total cost: $ 152.28532 15% gratuity: $ 22.83 Total with tip: 175.04 (hellboy) NSCHNS118:labs troys

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions