#Surafce area and volume calculator V1 #Date=3/11/25 #Author:Tyler Agnew #Purpose:To calculate the surface area and volume of a cylinder, sphere, and cone to 2sf print('Weclome to the surface area and volume calculator') recalculate_shape="y" while recalculate_shape=="y": shape_awn=input('type s for sphere, c for cone, and d for a cylinder') shape=shape_awn.lower() if shape=="s": radius=float(input(f'what is the radius of your sphere?')) sphere_surfacearea=4*3.14*radius**2 sphere_volume=4/3*3.14*radius**3 print(f'The volume of your sphere is {sphere_volume:.2f} and the surface area is {sphere_surfacearea:.2f}.') elif shape=="d": radius=float(input(f'what is the radius of your cylinder?')) height=float(input(f'what is the height of your cylinder?')) cylinder_surfacearea=(2*3.14*radius*height)+(2*3.14*radius**2) cylinder_volume=3.14*radius**2*height print(f'The volume of your cylinder is {cylinder_volume:.2f} and the surface area is {cylinder_surfacearea:.2f}.') elif shape=="c": radius=float(input('what is the radius of your cone?')) length=float(input('and what is the sledge length of your cone?')) height=float(input(' and what is the height of your cone?')) cone_surfacearea=(3.14*radius**2)+(3.14*radius*length) cone_volume=1/3*3.14*radius**2*height print(f'The volume of your cone is {cone_volume:.2f} and the surface area is {cone_surfacearea:.2f}.') else: print('Thats not vaild, try again') recalculate_shape=input('would you like to input another shape? Type y if you do want to repeat, and n if you do not.').lower() print('We hope this calculator helped you.') print('this program has ended')