diff --git a/circle1.py b/circle1.py new file mode 100644 index 0000000..0533a90 --- /dev/null +++ b/circle1.py @@ -0,0 +1,9 @@ +import math +PI = math.pi + +radius = float(input("Enter the radius of a circle ")) + +area = PI * radius**2 + +print(f"The area is {area}") + diff --git a/sphere1.py b/sphere1.py new file mode 100644 index 0000000..4b110e9 --- /dev/null +++ b/sphere1.py @@ -0,0 +1,10 @@ + +import math +PI = math.pi + +radius = float(input("Enter the radius of a sphere ")) + + +volume = 4 / 3 * PI * radius**3 + +print(f"The volume of the sphere is {volume}")