These are ideas for 45 minute workshops. Not suggesting them all, but maybe pick one or two for different age groups.
To give everyone a chance to write a working program, whatever their skill, start with Hello world
helloworld.py
and then extend that into looping forever
helloworld_forever.py
Once everyone has tried that out, briefly introduce
- variables
- math operations
- lists
- functions
- built in, like asking for a number from the user
- user defined
Ask for a number n, calculate n * (n - 1) * (n - 2) * ... * 1
factorial.py
The sequence 0, 1, 1, 2, 3, 5, 8, 13, .... so the sum of the previous two Fibonacci numbers.
fibonacci.py
You can see the computer start to slow quite quickly as the numbers grow bigger.
Finding prime numbers
sieve_of_eratosthenes.py
Read in a message, encrypt it and share the secret
secretmessage.py
Use PyGame to draw shapes on screen
pip install pygame
Would suggest giving these as starters-for-ten and the ask is to modify them.
pygame_landscape.py
pygame_face.py
pygame_shapes.py