Example Programs for Python Workshop
[Note: if you download these files, you will need to strip the.txt
off the filename before running them in python. The wiki insists on the txt
extension for security reasons]
Level 3 examples
- carGame.py.txt: Simple car game with two classes (Car, and CarGame), a list of objects (Cars) and event-driven input (a Reset button, and mouse events). This is just bare-bones - to make it a playable game, it at least needs some kind of scoring added (eg, points for how long you can keep going and penalties for crashing cars)
- bouncingBalls.py.txt: bouncingBalls.py
- garden-three-classes.py.txt: garden-three-classes.py
- tables.py.txt: tables.py
- garden-two-classes.py.txt: garden-two-classes.py
- guiClassTemplate.py.txt: gui template using a class
- guiTemplate.py.txt: gui template without a class
Level 2 examples
- Spell_Checker.py.txt: Spell_Checker (Heidi Newton)
data file: dictionary.txt: dictionary.txt - anagram_word_game.py.txt: Anagram game (Heidi Newton)
data file: anagram_game_words.txt: anagram_game_words.txt - quiz_game.py.txt: quiz_game (Heidi Newton) [bugs fixed!]
data file:questions.txt: questions.txt
Session 1
Session 2
Session 3
- flower.py.txt
- garden.py.txt (flowers in random positions)
- gardenMouse.py.txt (uses mouse to plant flowers, uses array of tuples to store flower data)
- introducingModulesAndParameters.py.txt: Series of tiny programs introducing modules and parameters
I | Attachment | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|
L3-garden-balls-tables.pdf | manage | 154 K | 04 Dec 2013 - 22:51 | Main.pondy | ||
txt | PegPuzzleObjEvent.py.txt | manage | 6 K | 11 Dec 2012 - 21:01 | Main.pondy | |
txt | ScissorsPaperRockGraphics.py.txt | manage | 7 K | 11 Dec 2012 - 21:01 | Main.pondy | |
txt | allowednames.py.txt | manage | 492 bytes | 11 Dec 2012 - 21:01 | Main.pondy | |
txt | bouncer.py.txt | manage | 4 K | 13 Dec 2012 - 09:24 | Main.pondy | Bouncling balls. GUI and Objects - Level 3 |
txt | bouncingBalls.py.txt | manage | 6 K | 11 Dec 2013 - 21:34 | Main.pondy | |
txt | carGame.py.txt | manage | 7 K | 02 Feb 2014 - 18:57 | Main.pondy | |
txt | eyes.py.txt | manage | 1 K | 11 Dec 2012 - 21:02 | Main.pondy | |
txt | flower.py.txt | manage | 674 bytes | 11 Dec 2012 - 21:02 | Main.pondy | |
txt | flowers.py.txt | manage | 1 K | 11 Dec 2012 - 21:02 | Main.pondy | |
txt | garden.py.txt | manage | 3 K | 04 Dec 2013 - 21:14 | Main.pondy | |
txt | gardenMouse.py.txt | manage | 1 K | 29 Apr 2012 - 11:47 | Main.pondy | |
txt | guess-the-word.py.txt | manage | 251 bytes | 11 Dec 2012 - 21:03 | Main.pondy | |
txt | mouse.py.txt | manage | 695 bytes | 25 Mar 2012 - 10:15 | Main.pondy | |
txt | multiplication.py.txt | manage | 307 bytes | 11 Dec 2012 - 21:03 | Main.pondy | |
gif | paper-left.gif | manage | 22 K | 11 Dec 2012 - 21:03 | Main.pondy | |
gif | paper-right.gif | manage | 19 K | 11 Dec 2012 - 21:03 | Main.pondy | |
txt | primes.py.txt | manage | 1 K | 29 Apr 2012 - 11:48 | Main.pondy | |
txt | quiz_game.py.txt | manage | 2 K | 11 Dec 2013 - 21:26 | Main.pondy | |
gif | rock-left.gif | manage | 13 K | 11 Dec 2012 - 21:04 | Main.pondy | |
gif | rock-right.gif | manage | 13 K | 11 Dec 2012 - 21:04 | Main.pondy | |
gif | scissors-left.gif | manage | 14 K | 11 Dec 2012 - 21:04 | Main.pondy | |
gif | scissors-right.gif | manage | 14 K | 11 Dec 2012 - 21:04 | Main.pondy | |
txt | timesTables.py.txt | manage | 351 bytes | 26 Mar 2012 - 05:10 | Main.pondy | |
txt | triangleWord.py.txt | manage | 585 bytes | 25 Mar 2012 - 10:15 | Main.pondy |