Prompt the user to input a food item name

Assignment Help Database Management System
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')

Reference no: EM132083519

Questions Cloud

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

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd