A menu will show three items and their prices: (a) Carbonara 100php (b) Fries 80php (c) Chicken nuggets 150php. The user will choose among two food delivery services: (1) Foodie panda and (2) food-deliver. After choosing the food delivery service, a discount and service charge for the item will be computed depending on the service chosen based on the table below. Food Delivery Service Food Discount Delivery Charge (1) Foodie panda 1% +10php (2) Food deliver 4% +30php Example: (a) carbonara 100php (2) Food deliver Discount: 100php X .04 = 4.00 100-4 = 96 php discounted price Delivery charge: 96+30 = 126 php total payment my code: #Output menu print("Items: \n1. Carbonara 100php \n2. Fries 80php \n3. Chicken nuggets 150php.") #Prompt for input choice = int(input("Enter item no: ")) quantity = int(input("Input quantity : ")) #Compare and assign price if choice==1: price = 100 elif choice==2: price = 80 elif choice == 3: price =150 #compute total total = price*quantity #Output result print("Total : ",total," php")
A menu will show three items and their prices: (a) Carbonara 100php (b) Fries 80php (c) Chicken nuggets 150php.
The user will choose among two food delivery services: (1) Foodie panda and (2) food-deliver. After choosing the food delivery service, a discount and service charge for the item will be computed depending on the service chosen based on the table below.
Food Delivery Service |
Food Discount |
Delivery Charge |
(1) Foodie panda |
1% |
+10php |
(2) Food deliver |
4% |
+30php |
Example:
(a) carbonara 100php
(2) Food deliver
Discount: 100php X .04 = 4.00 100-4 = 96 php discounted price
Delivery charge: 96+30 = 126 php total payment
my code:
#Output menu
print("Items: \n1. Carbonara 100php \n2. Fries 80php \n3. Chicken nuggets 150php.")
#Prompt for input
choice = int(input("Enter item no: "))
quantity = int(input("Input quantity : "))
#Compare and assign price
if choice==1:
price = 100
elif choice==2:
price = 80
elif choice == 3:
price =150
#compute total
total = price*quantity
#Output result
print("Total : ",total," php")
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps with 4 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)