Given the number of people attending a pizza party, output the number of needed pizzas and total cost. For the calculation, assume that people eat 2 slices on average and each pizza has 12 slices and costs $14.95. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('Cost: ${:.2f}'.format(cost)) Hint: Use the ceil() function from the math module to round up the number of pizzas so that enough pizzas are ordered. Ex: If the input is: 4 the output is: Pizzas: 1 Cost: $14.95

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 8RQ
icon
Related questions
Question

17.3 LAB: Pizza party

 

Given the number of people attending a pizza party, output the number of needed pizzas and total cost. For the calculation, assume that people eat 2 slices on average and each pizza has 12 slices and costs $14.95.

Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
print('Cost: ${:.2f}'.format(cost))

Hint: Use the ceil() function from the math module to round up the number of pizzas so that enough pizzas are ordered.

Ex: If the input is:

4

the output is:

Pizzas: 1 Cost: $14.95
344614.2153518.qx3zqy7
LAB
17.3.1: LAB: Pizza party
0/ 10
АCTIVITY
main.py
Load default template.
1 import math
''' Type your code here. '''
Run your program as often as you'd like, before submitting for grading. Below, type any needed
input values in the first box, then click Run program and observe the program's output in the
second box.
Develop mode
Submit mode
Enter program input (ontional)
Transcribed Image Text:LAB 17.3.1: LAB: Pizza party 0/ 10 АCTIVITY main.py Load default template. 1 import math ''' Type your code here. ''' Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box. Develop mode Submit mode Enter program input (ontional)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,