Added documantion and information to the programs
This commit is contained in:
parent
a2259b5b98
commit
db095e828d
4 changed files with 48 additions and 4 deletions
13
circle1.py
13
circle1.py
|
|
@ -1,3 +1,12 @@
|
|||
# Program circle1.py
|
||||
|
||||
startUpMessage = '''
|
||||
This program calculates the area of a circle.
|
||||
|
||||
'''
|
||||
|
||||
print(startUpMessage)
|
||||
|
||||
import math
|
||||
PI = math.pi
|
||||
|
||||
|
|
@ -5,5 +14,5 @@ radius = float(input("Enter the radius of a circle "))
|
|||
|
||||
area = PI * radius**2
|
||||
|
||||
print(f"The area is {area}")
|
||||
|
||||
print(f"The area is {area:.2f}")
|
||||
print("\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue