Today’s preconference session was a great way to force me to learn a bit of Python. The very basics were somewhat of a review since I read the first couple of chapters of the recommended book and I actually already knew much of it, but for those interested in knowing, here’s what we learned.
Much of the material can be found in Think Python: How to Think Like a Computer Scientist by Allen B. Downey.
Another resource: Cheatsheet of common syntax and data structures
We covered the basics including:
- types (string, int, float)
- values, variables, expressions
- arguments and basic functions
- for loop
Read chapters 1-3 (and do the exercises) and you’ll cover it all.
Had some fun drawing with ‘Bob’ the turtle.
This is covered in chapter 4 of the book.
Conditionals and Recursion
We then covered the slightly less than basic of:
- Boolean expressions
See chapter 5 of the book.
At the End of the Day
Honestly, the session wasn’t exactly bad, but I think I would’ve learned more by being sat down and simply being told to follow the book. We didn’t have a bad instructor, but I would want to get more than just what the book tells you.
A simple example would be how to get the full list of functions in TurtleWorld for us to play around rather than just telling us the couple functions that are expected in the one or two exercises.
Overall, a good session if you’re a real beginning with absolutely no programming background, but I think that 90+% of the group would have benefited from a much faster pace session. Other than recursion, I noticed that almost all the other times, people around me were doing other things. So, good instructor and session, just too easy for many.