lab3_part1
py
keyboard_arrow_up
School
Howard Community College *
*We aren’t endorsed by this school
Course
156
Subject
Industrial Engineering
Date
Dec 6, 2023
Type
py
Pages
2
Uploaded by DukeTigerPerson882
#this program is created by Raghav Jagota on 09/15/2023 and the purpose of creating
this program is to set up an order system for a pizza shop that sells 3 types of
pizza
#welcome title
print('Welcome to the CMSY-156 Pizza Shop')
print('What would you like to order today?')
print('\n')
#assigning the variables to pizza types
pizza_1 = 'Cheese Pizza'
pizza_2 = 'Garden Fresh Pizza'
pizza_3 = 'Meat Lovers Pizza'
#listing the prices of the pizza types
pizza_1_cost = 17.10
pizza_2_cost = 18.49
pizza_3_cost = 19.75
delivery_cost = 5
#input for the type of pizza the customer wants
pizza_type = int(input('Enter 1 for a Cheese pizza, 2 for a Garden Fresh pizza, 3
for a Meat Lovers pizza: '))
#input for delivery or pickup for the pizza
delivery_type = int(input('Enter 1 for delivery; 2 for pickup:'))
#asking the customer to enter the delivery address
if delivery_type == 1:
delivery_address = input('Enter your address for delivery:')
#input the amount of tip
tip_amount = float(input('Please enter the amount of the tip: $'))
print('\n')
#calculating the price for a cheese pizza with and without delivery cost
pizza_1_pickupcost =pizza_1_cost + 0.06*(pizza_1_cost) + tip_amount
pizza_1_totalcost = pizza_1_pickupcost + delivery_cost
#calculating the price for a Garden Fresh pizza with and without delivery cost
pizza_2_pickupcost = pizza_2_cost + 0.06*(pizza_2_cost) + tip_amount
pizza_2_totalcost = pizza_2_pickupcost + delivery_cost
#calculating the price for a Meat Lovers Pizza with and without delivery cost
pizza_3_pickupcost = pizza_3_cost + 0.06*(pizza_3_cost) + tip_amount
pizza_3_totalcost = pizza_3_pickupcost +delivery_cost
if pizza_type == 1:
print('You ordered a',pizza_1)
if delivery_type == 1:
print("Your total cost with tax,tip and delivery charge is: $
{:.2f}".format(pizza_1_totalcost))
print('Your pizza will be delivered to: ',delivery_address)
else:
print("Your toatl cost with tax and tip is: $
{:.2f}".format(pizza_1_pickupcost))
if pizza_type == 2:
print('You ordered a ',pizza_2)
if delivery_type == 1:
print("Your total cost with tax,tip and delivery charge is: $
{:.2f}".format(pizza_2_totalcost))
print('Your pizza will be delivered to: ',delivery_address)
else:
print("Your toatl cost with tax and tip is: $
{:.2f}".format(pizza_2_pickupcost))
if pizza_type == 3:
print('You ordered a ',pizza_3)
if delivery_type == 1:
print("Your total cost with tax,tip and delivery charge is: $
{:.2f}".format(pizza_3_totalcost))
print('Your pizza will be delivered to: ',delivery_address)
else:
print("Your toatl cost with tax and tip is: $
{:.2f}".format(pizza_3_pickupcost))
print('\n')
print('Thank you for using CMSY-156 Pizza Shop. Please come again')
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help