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

(Solved): Python. Please, read entire question. I am trying to get a grasp on floating-points. Pizza party ...



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, a

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 Dutput each floating-point value with two digits after the decimal point, which can be achieved as follows: orint 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 main.py Load default template...


We have an Answer from Expert

View Expert Answer

Expert Answer


import mathdef pizza_party(num_people): #calculate the number of slices needed for the number of people num_slices = num_people * 2 #round up
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe