To calculate area of a circle in python, you have to ask from user to enter radius of circle to calculate and print area of that circle on the output screen as shown in the program given below.
Following python program ask from user to enter radius of circle to find area of circle:
# Python Program - Calculate Area of Circle 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)
Here is the sample run of the above Python program shows how to calculate area of a circle:
You may also like to learn or practice the same program in other popular programming languages: