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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!