Added circle and sphere calculations

This commit is contained in:
cmitchell2301 2025-12-14 19:14:27 -05:00
parent b0f5d943be
commit 195a455032
4 changed files with 19 additions and 15 deletions

View file

@ -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}")

View file

@ -1,8 +0,0 @@
length = float(input("Enter a value for the length "))
width = float(input("Enter a value for the width "))
height = float(input("Enter a value for the height "))
volumeOfRectangle = length * width * height
print(f"Volume = {volumeOfRectangle:.1f}")

View file

@ -1,7 +0,0 @@
length = float(input("Enter a value for the length "))
width = float(input("Enter a value for the width "))
areaOfRectangle = length * width
print(f"Area = {areaOfRectangle:.1f}")

View file

@ -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}")