git_practice/circle1.py

19 lines
269 B
Python
Raw Permalink Normal View History

# Program circle1.py
startUpMessage = '''
This program calculates the area of a circle.
'''
print(startUpMessage)
2024-12-21 20:50:38 -05:00
import math
PI = math.pi
radius = float(input("Enter the radius of a circle "))
area = PI * radius**2
print(f"The area is {area:.2f}")
print("\n")