-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPython Syntax Correction.py
More file actions
62 lines (45 loc) · 1.9 KB
/
Copy pathPython Syntax Correction.py
File metadata and controls
62 lines (45 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 19 15:51:16 2023
@author: lEO
"""
# Setting the Business Variables
Large = 30
Medium = 25
Small = 20
SmallPepperoni = 5
MediumPepperoni = LargePepperoni = 15
ExtraCheese = 3
TotalAmount = 0
# Indroduction and Showing the Menu
print(f"Welcome to Edsam Pizza's where we serve the best pizza you've ever had. \nOUR MENU FOR PIZZA SIZES:\n---> Large Pizza - ${Large}\n---> Medium Pizza - ${Medium}\n---> Small Pizza - ${Small}\n\nWe also offer Pepperoni and Extra Cheese if you would like.\n\n")
# QUESTION 1
size = input("What pizza size will you like to have?\n RESPONSE: ").lower().strip()
if size == "large":
TotalAmount = TotalAmount + Large
elif size == "medium":
TotalAmount = TotalAmount + Medium
elif size == "small":
TotalAmount = TotalAmount + Small
else:
print("Invalid Input. Please specify the correct pizza size from the menu.")
# QUESTION 2
pepperoni = input(f"Will you like pepperoni with your {size} pizza?YES or NO?\n RESPONSE: ").lower().strip()
if pepperoni == "yes" and size == "small":
TotalAmount = TotalAmount + SmallPepperoni
elif pepperoni == "yes" and (size == "medium" or size == "large"):
TotalAmount = TotalAmount + (MediumPepperoni or LargePepperoni)
elif pepperoni == "no":
TotalAmount = TotalAmount
else:
print("You need to specify correctly if you want pepperoni or not. Please indicate with a YES or No!")
# QUESTION 3
cheese = input(f"Will you like extra cheese with your {size} pizza?YES or NO?\n RESPONSE: ").lower().strip()
if cheese == "yes":
TotalAmount = TotalAmount + ExtraCheese
elif cheese == "no":
print("Alright! We wouldn't add extra cheese with your pizza.")
else:
print("Specify correctly if you want extra cheese or not. Please indicate with a YES or NO.")
# Conclusion on Bill
print(f"\n\nAlright we would have you pizza ready soon. Your total bill is ${TotalAmount}.")