Most python exercises I found online were either too easy or tested things that were not directly related to python (mostly data structures or algorithms). Neither is a good choice when you're teaching Python courses. This following list has helped me learn and later teach various topics in Python. They focus on the langauge itself and the standard library. Hope you'll find it useful, and feel free to add yours in comments. Basic Syntax Write a program that asks the user for a number (integer only)
Python provides 3 different scoping declarations for variables: implicit (default) scope, global and nonlocal. Let's explore their semantics and differences.