Welcome to Westonci.ca, where curiosity meets expertise. Ask any question and receive fast, accurate answers from our knowledgeable community. Get immediate and reliable answers to your questions from a community of experienced professionals on our platform. Explore comprehensive solutions to your questions from knowledgeable professionals across various fields on our 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}")
We hope you found what you were looking for. Feel free to revisit us for more answers and updated information. Your visit means a lot to us. Don't hesitate to return for more reliable answers to any questions you may have. Get the answers you need at Westonci.ca. Stay informed by returning for our latest expert advice.