This commit is contained in:
Maxwell Jeffress
2026-02-20 11:42:22 +11:00
commit 3fdb90a652
5 changed files with 189 additions and 0 deletions

19
old/activity-deep.py Normal file
View File

@@ -0,0 +1,19 @@
# Created by Maxwell Jeffress on 11/02/2026.
# Calculates the volume of a cube, square based pyramid, and cylinder.
import math
width = 0
try:
width = int(input("Width: "))
except ValueError:
print("Invalid input!")
exit(1)
cubeSize = width ^^ 3
print("Cube volume is", cubeSize)
cylinder = ( math.pi * (width / 2) ^^ 2 * width )
print("Cylinder volume is", cylinder)