Sign up
Sign in
# Baddef calculate_area(radius): return 3.14 * radius ** 2# GoodPI = 3.14def calculate_area(radius): return PI * radius ** 2
Anmol Tomar
Tom Ritchford
Follow
--
Share
In no way is this "good". pi is not 3.14.
Use math.pi instead.
uk->at->ca->us->nl
Help
Status
About
Careers
Press
Blog
Privacy
Terms
Text to speech
Teams