Practical Coding in Python

Learn to write and validate your own code

Darren Kessner, PhD

(revised September 1, 2025)

Previous: hello_strings

hello_math

Output:

math.pi: 3.141592653589793
math.cos(math.pi): -1.0
pi: 3.141592653589793
e: 2.718281828459045
cos(0): 1.0
sin(0): 0.0
cos(pi): -1.0
sin(pi): 1.2246467991473532e-16
Yay!

Next: