Difference between revisions of "Intro to Programming"

From HacDC Wiki
Jump to navigation Jump to search
Line 24: Line 24:
  
 
''' Covers ''':
 
''' Covers ''':
 +
Some history.
 +
IDLE and Python.
 +
Primitive data types.
 +
Statements and expressions.
 +
Hello World!
 +
Turtle Graphics
 
''' Slides ''':
 
''' Slides ''':
 +
[[File:Class_0.pdf]]
 
''' Workshop ''':
 
''' Workshop ''':
 +
Get things working!
 
''' Demo code ''':
 
''' Demo code ''':
 
[[File:Turtle_demo.py]]
 
[[File:Turtle_demo.py]]
 
[[File:Wrapper_turtle.py]]
 
[[File:Wrapper_turtle.py]]
 
''' Homework ''':
 
''' Homework ''':
 +
Draw a pretty picture using the turtle graphics.
 +
 +
== Class 1 ==
 +
 +
''' 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]]

Revision as of 19:01, 25 May 2011

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.

Setting up git on Windows Setting up git on OS X Setting up git on Linux (you may choose to use your package manager (apt, yum, pacman, etc.) to install the git-core package)

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

Class 0

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.

Class 1

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