Intro to Programming
Pre class HW
For the class we will be using python and pygame. Instructions on how to install them on your operating system of choice can be found below.
Git and Github
We would like those taking the class to keep a source repository to store workshop and homework code so that: 1. they can modify without fear of messing it up beyond repair 2. they can share code and, thus, assist each other
To that end, we have some resources below to get git installed, open a github account, and the main git commands you will need to get started.
If you can go through this before the class 0, great! you will have more time to write some code during the workshop. Otherwise, we will be available to assist anyone who may need help getting things started.
You can get the presentation slides, code, and other material from this wiki OR live from the class repository
Covers : Some history. IDLE and Python. Primitive data types. Statements and expressions. Hello World! Turtle Graphics Slides : File:Class 0.pdf Workshop : Get things working! Demo code : File:Turtle demo.py File:Wrapper turtle.py Homework : Draw a pretty picture using the turtle graphics.
Covers : Program control. If statements. For loops. While loops. Pygame drawing. Slides : File:Class 1.pdf Workshop : Pygame picture time! Demo code : File:Pygame pretty picture.py File:Pong paddle hit.py Homework : Make an animation using your new looping and pygame drawing skills. Sign up for the email list, and introduce your self. Include a link to your GitHub repository.
Covers : Functions. Common data structures. Pygame events. Slides : File:Class 2.pdf Workshop : Pong code with functions! Quick event demo. Demo code : Check the repo! Homework : Email list, do it! Share your repo and code! Make that animation you had interactive using the new event or I/O stuff. Try and make your previous code use functions.
Covers : Classes. Modules and Packages. Slides : File:Class 3.pdf Workshop : Sprite demo! Pong with classes! (And probably prettier than the original one) Demo code : Check the repo! Homework : Package some of your existing code into a module. Try making a few objects for your interactive animation. Extend the sprite so there's more than one sprite on screen and they're keyboard controlled.