Added documantion and information to the programs

This commit is contained in:
jdavilabeaz2401 2025-11-26 13:53:18 -05:00
parent a2259b5b98
commit db095e828d
4 changed files with 48 additions and 4 deletions

View file

@ -1,3 +1,12 @@
# Program sphere1.py
startUpMessage = '''
This program calculates the volume of a sphere.
'''
print(startUpMessage)
import math
PI = math.pi
@ -7,4 +16,4 @@ radius = float(input("Enter the radius of a sphere "))
volume = 4 / 3 * PI * radius**3
print(f"The volume of the sphere is {volume}")
print(f"The volume of the sphere is {volume:.2f}")