Question
Please help me with this python question. I would appreciate it if you add some explanations. Which Pizza to buy! Pizza sizes are given as
Please help me with this python question. I would appreciate it if you add some explanations.
Which Pizza to buy! Pizza sizes are given as the diameter of the pizza in inches. However, the quantity of pizza is determined by the area of the pizza, and the area is not proportional to the diameter. Most people cannot easily estimate the difference in area between a 10-inch pizza and a 12-inch pizza and so cannot easily determine which size is the best buythat is, which size has the lowest price per square inch.
Write a Python program that does the following:
Reads four float values representing the diameter of the smaller pizza, the diameter of the larger pizza, the price of the smaller pizza, and the price of the larger pizza
Compute the area of each pizza in the variables
Compute the price per square inch for each pizza and determine which pizza is a better buy.
NOTE: The pizza that has lower price per square inch is the better buy.
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