Question
price = float(input('Enter price: ')) diameter = float(input('Enter diameter in inches: ')) area = pi*(diameter/2)**2 cost_per_square_inch = price/area print('Cost per square inch is $%.2f' %
price = float(input('Enter price: ')) diameter = float(input('Enter diameter in inches: '))
area = pi*(diameter/2)**2
cost_per_square_inch = price/area
print('Cost per square inch is $%.2f' % cost_per_square_inch)
if cost_per_square_inch > 0.1:
print('The pizza is too expensive') else: print('Buy it. It\'s a good idea!')
Write a graphics python program!!!!!!! to calculate the cost per square inch of a circular pizza and use graphics .py libaray!!!!! . Accept as input the diameter (in inches) and pizza price. Print the cost per square inch. If the cost per square inch is more than $.10 print a message that informing the user that this pizza is too expensive. Otherwise let the user know this is a good deal!
* Calculate the total
*Set 3 fields
Example : Enter the price , Enter diameter in inches and Cost per square inches is
*create edit text field in rows of above three fields
* use if statement and other operators
* use grapics.py libaray
and name it pizza.py.....This is a PYTHON language!!!!!!!!!!
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