Question: 1 8 . 1 1 LAB * : Program: Pizza Party LABACTIVITY 1 8 . 1 1 . 1 : LAB * : Program: Pizza

18.11 LAB*: Program: Pizza Party
LABACTIVITY
18.11.1: LAB*: Program: Pizza party weekend
0/2
Program Specifications. Write a program to calculate the cost of hosting pizza a party. Read from input the number of people attending, the average number of slices per person and the cost of one pizza. Dollar values are output with two decimals. For example,print(f"Cost: ${cost:.2f}").
Step 1. Read from input the number of people (int), average slices per person (float) and cost of one pizza (float). Calculate the number of whole pizzas needed (8 slices per pizza). There will likely be leftovers for breakfast. Hint: Use the ceil() function from the math library to round up to the nearest whole number and convert to an int. Calculate the cost for all pizzas.
Step 2. Calculate the sales tax (7%) and delivery charge (20% of cost including tax).
Step 3. Calculate and output the total including pizza, tax and delivery. Submit for grading to confirm tests pass.
Ex: If the input is:
102.610.50
The output is:
Pizza Night Party 4 Pizzas: $42.00 Tax: $2.94 Delivery: $8.99 Total: $53.93

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!