Use pyhton Language Create your own original problem and have the user plug in t
ID: 3604574 • Letter: U
Question
Use pyhton Language
Create your own original problem and have the user plug in the variables. If you are not in the mood for anything original, choose an equation from this list:
When done, check to make certain your variable names begin with a lower case letter, and that you are using blank lines between logical groupings of the code. (Between input, calculations, and output in this case.) Find Areas and Volumes of each
Area of a circle A=pi*r^2 Area of an ellipse A= pi*r1*r2 Area of an equilateral triangle A = (h^2*(3)^1/2)/3 Volume of a cone V = (pi*r^2*h)/3 Volume of a sphere V = (4*pi*r^3)/3 Area of an arbitrary triangle A = 1/2*absinCExplanation / Answer
while True:
print("Enter 'x' for exit.")
rad = input("Enter radius of circle: ")
if rad == 'x':
break
else:
radius = float(rad)
area = 3.14 * radius * radius
print("Area of Circle = %0.2f" %area)
Output
Enter 'x' for exit.
Enter radius of circle: Area of Circle = 28.26
Enter 'x' for exit.
Enter radius of circle: x
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.