Answered step by step
Verified Expert Solution
Question
1 Approved Answer
use python code to write the program below 5.2 Pizza For Everyone! This lab will be available until January 21st, 11:59 PM EST Mario and
use python code to write the program below
5.2 Pizza For Everyone! This lab will be available until January 21st, 11:59 PM EST Mario and Luigi's Pizzeria needs a program to calculate the number of slices a pizza of any size can be divided into and . the number of pizzas a customer should order so there is enough pizza for his/her party, Write a program that Asks the user to enter the diameter of the pizzas to be ordered (in inches) Asks the user to enter the number of people in the customer's party Calculates the number of slices that may be taken from a pizza of the given size Calculates the number of pizzas that need to be ordered, assuming that each person in the customer's party will eat an average of 3 slices Display the tesults, that is, the number of slices each pizza yields and how many pizzas should be ordered To calculate the number of slices that may be taken from a pizza, you must know the following facts Each slice should have an area of 14.125 inches The area of the pizza is calculated with the same formula you use to calculate the area of a circle You must determine the number of slices using a function slicesPerPizza(diameter) Given the diameter of the pizza, it will return the number of slices the pizza will have as an integer Note: You will need to round the results. In order to do that, you must import the math module (hint you will need to use ceiland floor) Here are a few sample runs Welcome to Mario and Luigi's Pizzeria Enter the diameter of the pizzas you want to order (in inches): 14 Enter the number of people in your party: 3 For a party of 3 people you need to order 1 pizza (a). A 14 inch pizza will yield 10 slices. Welcome to Mario and Luigi's Pizzeria Enter the diameter of the pizzas you want to order (in inches): 16 Enter the number of people in your party: 20 For a party of 20 people you need to order 5 pizza(s). A 16 inch pizza will yield 14 slices. Notes will be some of the criteria Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started