Home /
Expert Answers /
Computer Science /
python-please-read-entire-question-i-am-trying-to-get-a-grasp-on-floating-points-pizza-party-pa249

Python. Please, read entire question. I am trying to get a grasp on floating-points.

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.

Given the number of people attending a pizza party, output the number of needed pizzas and total cost. For the calculation, assume that beople eat 2 slices on average and each pizza has 12 slices and costs $$14.95$ Dutput each floating-point value with two digits after the decimal point, which can be achieved as follows: orint $(f_{?}cost:${cost:2f}_{?})$ Hint Use the ceilo function from the math module to round up the number of pizzas so that enough pizzas are ordered. Ex: If the input is: 4 he output is: Pizzas: 1 Cost: \$14.95 3.25.1: LAB: Pizza party $0/10$ main.py Load default template...

import mathdef pizza_party(num_people): #calculate the number of slices needed for the number of people num_slices = num_people * 2 #round up