Python
June 17
Plan
- Review class rules
- Discussion of Python vs "trainer" environments like Scratch and Alice
- xturtle demo and lecture
- Lab
Reflections
Lecture was effective. Kids participated, answered and asked questions, seemed to enjoy Python and xturtle. Kids took good notes. In the lab learned how important the details like case sensitivity and including all required parentheses are. Kids learned about the Pen class, dir(), help(), rt(), fd(), and doing fd() and rt() in a for loop.
This is the first time I've started a beginning Python class with xturtle, and I'm glad I did. It kept their interest and exposed them to variables and calling methods on objects (although they don't know those terms yet), and loops.
June 18
Plan
- How to use Moodle
- Some Python fundamentals, like variables, print and raw_input, and if
- Lab
Reflections
I was really pleased with how well this went. I demonstrated Python features, and the kids' questions led us right along the path I had planned. This is an excellent group. At the halfway point, I invited kids to stay behind in the classroom and have more dialog/explanation from me, and four did. It was very productive.
June 19
Plan
- More fundamentals
- Pygame
- Lab
Reflections
I taught how to use random.random and random.choice. TA#1 showed scratch board, and how to read it from Python. I postponed Pygame until next week. I didn't leave enough time for lab.
June 24
Plan
- Review of everything taught so far. See examples on Moodle.
- Pygame
- Lab
Reflections
The review showed me that a lot of the details didn't stick. It went pretty slowly, and we only got part-way through. I showed Pygame--the Aliens example, including changing some of the constants and code to make things faster and more interesting.
June 25
Plan
- Further review of everything taught so far.
- TA#1 gives optional assignments he made
- Lab
Reflections
A good review. Some extended talk on the code necessary to get a random integer in a range, such as for simulating a die throw. One girl wants to modify the Pygame Aliens example to allow the player to shoot at and explode the dropping bombs, and we are helping her with that.
June 26
Plan
- Optional lecture: review, answer questions
- Extended lab time
Reflections
Most students chose to go to the lab immediately. I remained in the classroom with about five students. We talked about Will Wright's visit, programming languages in use today, binary numbers, how big a number you can store in an int in Python, books, and more.
July 1
Plan
- Tuples and dictionaries
- Adventure game
- Lab time
Reflections
I showed a very simple text adventure game, and explained tuples, and, briefly, dictionaries.
July 2
Plan
- Two-line Python Web server
- Lab time
Reflections
I showed a simple Python Web server, and along the way we discussed domain name lookup, IP addresses, ports, botnets and distributed denial of service attacks.
July 3
Plan
- Quick review
- Python web client
- Where to go from here
- Develop and show what you've learned
Reflections
Reviewed Wednesday's network-related lessons. Showed how to fetch from a URL in Python. TA#2 showed an Xturtle program controlling the turtle with arrow keys. TA#1 showed and talked about the Quake source code. Most chose to go to the lab, and some stayed with TA#1 who:
- discussed assembly language in more depth
- discussed linux and open-source software
- introduced VMWare Server