Reference no: EM132083519
Note: When accuracy is essential, floats are not used to represent currency due to rounding and accumulation errors. Python provides several primitives specifically developed to implement financial applications. However, these topics are beyond the scope of this lab.
(1) Prompt the user to input a food item name, price, and quantity. Output an itemized receipt.
Enter food item name: hot dog Enter item price: 2 Enter item quantity: 4 RECEIPT 4 hot dog @ $ 2.0 = $ 8.0 Total cost: $ 8.0
(2) Extend the program to prompt the user for a second item. Output an itemized receipt.
Enter food item name: hot dog Enter item price: 2 Enter item quantity: 4 RECEIPT 4 hot dog @ $ 2.0 = $ 8.0 Total cost: $ 8.0 Enter second food item name: ice cream Enter second item price: 2.50 Enter second item quantity: 3 RECEIPT 4 hot dog @ $ 2.0 = $ 8.0 3 ice cream @ $ 2.5 = $ 7.5 Total cost: $ 13.5
(3) Extend again to output a third receipt that adds a mandatory 15% gratuity to the total cost. Output the total cost, the cost of gratuity, and the grand total.
Enter food item name: hot dog Enter item price: 2 Enter item quantity: 4 RECEIPT 4 hot dog @ $ 2.0 = $ 8.0 Total cost: $ 8.0 Enter second food item name: ice cream Enter second item price: 2.50 Enter second item quantity: 3 RECEIPT 4 hot dog @ $ 2.0 = $ 8.0 3 ice cream @ $ 2.5 = $ 7.5 Total cost: $ 13.5 15% gratuity: $ 2.025 Total with tip: $ 15.525
Any help would be appreciated, it is in Python, been stuck on this for a while. This is the code that was pre-typed:
itemName = input('Enter food item name: \n')
What percentage of sales can we afford to pay
: What percentage of sales can we afford to pay the salesperson and make the same profit as we would have if we did not accept the plan
|
Prepare a multistep income statement for distribution
: Prepare a multistep income statement for distribution to external financial statement users - Administrative Expenses, $2,700; Cost of Goods Sold, $24,300
|
What is a proposed leadership style
: What is a proposed leadership style? Can you please give an example of a leadership style using a group or team.
|
Instance of civil disobedience in the united states
: What and when was the first instance of civil disobedience in the United States?
|
Prompt the user to input a food item name
: Prompt the user to input a food item name, price, and quantity. Output an itemized receipt.
|
How much would absorption costing income
: How much would absorption costing income from operations differ between a plan to produce 3,500 units and a plan to produce 5,700 units
|
Compute the gross profit rate
: Prepare a multiple-step income statement - Compute the gross profit rate. (Round answer to 2 decimal places, e.g. 10.50.)
|
Retrieve data of students from past and current enrollment
: Faculty members can also retrieve list of his or her advisees. Select one, and then retrieve that student's past and current enrollment information.
|
Reserve requirements on time deposits
: What would be the estimated Eurodollar deposit rate if the domestic U.S. dollar deposit rate is 8½%, the reserve requirements on time deposits
|