The Bill
How much will the party cost? The pizzeria's prices are in new variables at the top of the program: pizza_price is the price of one pizza, and delivery_price the price of the delivery. The delivery is free when the pizzas cost free_delivery_from or more, that is 50 EUR.
Add the bill below what the program already prints. The total is the price of the pizzas plus the delivery, and each guest pays an equal share of it. For our party, the whole output is:
Slices: 36
Pizzas: 5
Left over: 4 slices
Pizzas cost: 60 EUR
Delivery: free
Total: 60 EUR
Per guest: 5.0 EUREach guest's share is a decimal number, because / always gives one. That's why it's 5.0.
The delivery isn't always free. For a smaller party, with guests = 4, the pizzas cost 24 EUR, so the program prints Delivery: 5 EUR and Total: 29 EUR.
Instructions
Print the price of the pizzas and the price of the delivery. When the delivery is free, print Delivery: free.
Print the total and how much each guest pays.
Start programming for free
2/3