Question

Python 3.6

i need the code ready to copy and run with adequate indentation

Write a program that will calculate the cost of purchasing a meal. This program will include decisions and loops. Details of the program are as follows: Your menu items only include the following food with the accompanying price o Yum Yum Burger .99 o Grease Yum Fries 79 o Soda Yum 1.09 Allow the user of the program to purchase any quantity of these items in one order Allow the user of the program to purchase one or more types of these items in one order. After the order is placed, calculate total and add a 6% sales tax. Print to the screen a receipt showing the total purchase price.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

def menu():
print("1.Yum Yum Burger = .99")
print("2.Grease Yum Fries = .79")
print("3.Soda Yum = 1.09")
print("4.Close")
i = True
j=0
k=0
l=0
total = 0
while(i):
item = int(input("Enter the no of the item "))
if(item == 1):
no = int(input("Enter no. of items u want "))
j = j+no
total = total +(no*0.99)
i = True
elif(item == 2):
noa = int(input("Enter no. of items u want "))
total = total +(noa*0.79)
k = k+noa
i = True
elif(item == 3):
now = int(input("Enter no. of items u want "))
total = total +(now*1.09)
l = l+now
i = True
elif(item == 4):
i = False
total = total+(0.06*total)

print("\n YOUR RECIEPT :")

print("1.Yum Yum Burger " + str(j) +" cost "+str(j*0.99))
print("2.Grease Yum Fries " + str(k) +" cost "+str(k*0.79))
print("3.Soda Yum " + str(l) +" cost "+str(l*1.09))
print("Total amount is " + str(total))
  

  

emint (input (Ente (item1): RESTART: F:/all/menu . ру >>import menu >>>menu.menu () 1. Yum Yum Burger = .99 2.Grease Yum Fri
  
  
  

Add a comment
Know the answer?
Add Answer to:
Python 3.6 i need the code ready to copy and run with adequate indentation Write a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Lab 5 python code and raptor flowchart yum yum burger joint

    Write the Flowchart and Python code for the following programming problem and the pseudo code below.Write a modular program that will calculate the cost of purchasing a meal. The Python program can use global or local variables and RAPTOR use global variables. Thisprogram will include decisions and loops. Details of the program are as follows:• Your menu items only include the following food with accompanied price:o Yum Yum Burger = .99o Grease Yum Fries = .79o Soda Yum = 1.09•...

  • Python 3.6 I need the code ready to run using GUI programming Write a program for...

    Python 3.6 I need the code ready to run using GUI programming Write a program for the Knight's Tour problem. Your program should let the user move a knight to any starting square and click the Solve button to animate a knight moving along the path, as shown below.

  • Please write this code in JAVA lang., thank you! Your spouse's cousin's nephew's dog's trainer's ...

    Please write this code in JAVA lang., thank you! Your spouse's cousin's nephew's dog's trainer's best friend owns a restaurant. That person is very bad at math and recently discovered that most customers have been significantly undercharged for meals. You have been approached to create a computer program that will accurately calculate bills for each customer. Kids, under 5, eat free. Teens and seniors get a 25% discount. Also, Food and beverage is taxed at 5%. No tax for anything...

  • Please write this code in JAVA lang., thank you! Your spouse's cousin's nephew's dog's trainer's best...

    Please write this code in JAVA lang., thank you! Your spouse's cousin's nephew's dog's trainer's best friend owns a restaurant. That person is very bad at math and recently discovered that most customers have been significantly undercharged for meals. You have been approached to create a computer program that will accurately calculate bills for each customer. Kids, under 5, eat free. Teens and seniors get a 25% discount. Also, Food and beverage is taxed at 5%. No tax for anything...

  • in python Write a class named RetaiI_Item that holds data about an item in a retail...

    in python Write a class named RetaiI_Item that holds data about an item in a retail store. The class should store the following data in attributes: • Item Number • Item Description • Units in Inventory • Price Create another class named Cash_Register that can be used with the Retail_Item class. The Cash_Register class should be able to internally keep a list of Retail_Item objects. The class should include the following methods: • A method named purchase_item that accepts a...

  • IN C# Write a program to help a local restaurant automate its lunch billing system. The...

    IN C# Write a program to help a local restaurant automate its lunch billing system. The program should do the following: Show the customer the different lunch items offered by the restaurant. Allow the customer to select more than one item from the menu. Calculate and print the bill. Assume that the restaurant offers the following lunch items (the price of each item is shown to the right of the item): Ham and Cheese Sandwich $5.00 Tuna Sandwich $6.00 Soup...

  • C LANGUAGE. PLEASE INCLUDE COMMENTS :) >>>>TheCafe V2.c<<<< #include ...

    C LANGUAGE. PLEASE INCLUDE COMMENTS :) >>>>TheCafe V2.c<<<< #include <stdio.h> int main() { int fries; // A flag denoting whether they want fries or not. char bacon; // A character for storing their bacon preference. double cost = 0.0; // The total cost of their meal, initialized to start at 0.0 int choice; // A variable new to version 2, choice is an int that will store the // user's menu choice. It will also serve as our loop control...

  • i need help making this program the skeleton of the code is below: //Include the following #include <iostream> #...

    i need help making this program the skeleton of the code is below: //Include the following #include <iostream> #include <string> #include <fstream> //you must include this library if you wish to do file i/o using namespace std; /********************************************************* //Following is the declaration of a order record **********************************************************/ class order_record { public: string cell_number; string item_number; double quantity; double price; int processing_plant; double tax_rate; double order_tax; double net_cost; double total_cost; }; //Prototypes for your functions: input, output, and process will go...

  • In C++ Programming Write a program in Restaurant.cpp to help a local restaurant automate its breakfast...

    In C++ Programming Write a program in Restaurant.cpp to help a local restaurant automate its breakfast billing system. The program should do the following: Show the customer the different breakfast items offered by the restaurant. Allow the customer to select more than one item from the menu. Calculate and print the bill. Assume that the restaurant offers the following breakfast items (the price of each item is shown to the right of the item): Name Price Egg (cooked to order)...

  • I need this python program to access an excel file, books inventory file. The file called...

    I need this python program to access an excel file, books inventory file. The file called (bkstr_inv.xlsx), and I need to add another option [search books], option to allow a customer to search the books inventory, please. CODE ''' Shows the menu with options and gets the user selection. ''' def GetOptionFromUser(): print("******************BookStore**************************") print("1. Add Books") print("2. View Books") print("3. Add To Cart") print("4. View Receipt") print("5. Buy Books") print("6. Clear Cart") print("7. Exit") print("*****************************************************") option = int(input("Select your option:...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT