Leaving Cert Notes

Notes and Anki Decks for the Leaving Cert

volumesphere.py

The formula is $4/3πr³$

2 variables we need to get

pi = 3.14 # What we picked as pi
r = 5 # Radius we choosed (We can vary)
answer = ((4/3*pi)*r**3) # ** is a power
round_ans = round(answer, 2) # Defines the rounded answer
print(round_ans) # Prints rounded answer