Hello, I need help in creating a flowgorithm from this python code. Here is the code below: print("Type '1.1' if your given value is radius, '1.2' for diameter, and '1.3' for area ") function = float(input("Enter the letter to start solving: ")) while function == Radius: print('You have chosen radius.') radius = float(input("Enter radius: ")) Circumference1 = 2 * math.pi * radius print("The Answer is: %.4f" % Circumference1) break while function == Diameter: print('You have chosen diameter.') diameter = float(input("Enter diameter: ")) Circumference2 = math.pi * diameter print("The Answer is: %.4f" % Circumference2) break while function == Area: print('You have chosen area.') area = float(input("Enter Area: ")) Circumference3 = 2 * math.sqrt(math.pi * area) print("The Answer is: %.4f" % Circumference3) break print() print("Thank you for your participation! ")
Hello, I need help in creating a flowgorithm from this python code.
Here is the code below:
print("Type '1.1' if your given value is radius, '1.2' for diameter, and '1.3' for area ")
function = float(input("Enter the letter to start solving: "))
while function == Radius:
print('You have chosen radius.')
radius = float(input("Enter radius: "))
Circumference1 = 2 * math.pi * radius
print("The Answer is: %.4f" % Circumference1)
break
while function == Diameter:
print('You have chosen diameter.')
diameter = float(input("Enter diameter: "))
Circumference2 = math.pi * diameter
print("The Answer is: %.4f" % Circumference2)
break
while function == Area:
print('You have chosen area.')
area = float(input("Enter Area: "))
Circumference3 = 2 * math.sqrt(math.pi * area)
print("The Answer is: %.4f" % Circumference3)
break
print()
print("Thank you for your participation! ")
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images