Westonci.ca is the premier destination for reliable answers to your questions, provided by a community of experts. Ask your questions and receive detailed answers from professionals with extensive experience in various fields. Get detailed and accurate answers to your questions from a dedicated community of experts on our Q&A platform.
Sagot :
Answer:
Name: tyler
Number of pizzas: 2
Small (10 inch, $7.95), Medium (12 inch, $9.95), and Large (14 inch, $11.95)
Pizza size: large
Available toppings: Ham, Mushrooms, Onions, Green Peppers, Black Olives, Tomatoes, Pineapple, Spinach
$0.75 each for Small Pizza, $0.95 each for Medium Pizza, and $1.15 each for Large Pizza
Number of toppings: 2
Enter topping number 1: ham
Enter topping number 2: onions
Order Summary:
Customer Name: tyler
2 large pizzas with ['ham', 'onions']
Subtotal | Sales Tax (6%) | Total Cost
26.2 | 1.5719999999999998 | 27.772
Explanation:
name = input("Name: ")
num_pizzas = int(input("Number of pizzas: "))
print("Small (10 inch, $7.95), Medium (12 inch, $9.95), and Large (14 inch, $11.95)")
pizza_size = input("Pizza size: ").lower()
print("Available toppings: Ham, Mushrooms, Onions, Green Peppers, Black Olives, Tomatoes, Pineapple, Spinach")
print("$0.75 each for Small Pizza, $0.95 each for Medium Pizza, and $1.15 each for Large Pizza")
num_toppings = int(input("Number of toppings: "))
toppings = []
subtotal = 0
tax = 0
total = 0
for i in range(1,num_toppings + 1):
toppings.append(input(f"Enter topping number {i}: "))
if pizza_size == 'small':
subtotal += num_pizzas * 7.95
subtotal += num_toppings * 0.75
tax += subtotal * 0.06
total += subtotal + tax
print("Order Summary: ")
print(f"Customer Name: {name}")
print(f"{num_pizzas} {pizza_size} pizzas with {toppings}")
print("Subtotal | Sales Tax (6%) | Total Cost")
print(f"{subtotal} | {tax} | {total}")
if pizza_size == 'medium':
subtotal += num_pizzas * 9.95
subtotal += num_toppings * 0.95
tax += subtotal * 0.06
total += subtotal + tax
print("Order Summary: ")
print(f"Customer Name: {name}")
print(f"{num_pizzas} {pizza_size} pizzas with {toppings}")
print("Subtotal | Sales Tax (6%) | Total Cost")
print(f"{subtotal} | {tax} | {total}")
if pizza_size == 'large':
subtotal += num_pizzas * 11.95
subtotal += num_toppings * 1.15
tax += subtotal * 0.06
total += subtotal + tax
print("Order Summary: ")
print(f"Customer Name: {name}")
print(f"{num_pizzas} {pizza_size} pizzas with {toppings}")
print("Subtotal | Sales Tax (6%) | Total Cost")
print(f"{subtotal} | {tax} | {total}")
Thanks for using our service. We aim to provide the most accurate answers for all your queries. Visit us again for more insights. We appreciate your time. Please come back anytime for the latest information and answers to your questions. Thank you for using Westonci.ca. Come back for more in-depth answers to all your queries.