Upload files to "/"
This commit is contained in:
commit
9841335fae
5 changed files with 80 additions and 0 deletions
18
circle1.py
Normal file
18
circle1.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Program circle1.py
|
||||
|
||||
startUpMessage = '''
|
||||
This program calculates the area of a circle.
|
||||
|
||||
'''
|
||||
|
||||
print(startUpMessage)
|
||||
|
||||
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")
|
Loading…
Add table
Add a link
Reference in a new issue