Practical Coding in Python

Learn to write and validate your own code

Darren Kessner, PhD

(revised September 1, 2025)

Previous: 1. Functions and Testing

functions

Output:

Hello, world!
sum(5,7): 12
Hello, world!
is_odd(5): True
is_odd(7): True
is_odd(8): False
odd_numbers: [1, 3, 5, 7, 9]
even_numbers: [0, 2, 4, 6, 8]

Next: