Intro to Python, April 6 - Recap
This past weekend, I helped a bright group of Austin women take their initial steps into the Python world. Austin PyLadies' first women’s ‘Intro to Python’ class took place on Saturday, April 6th. Our classroom space was generously donated by by Erica Douglass of Opportunity Space. We also had the help of several terrific volunteers: Sara Safavi, Cassidy Santaguida and Andrew Dupont.
This one-day workshop covered some computing and programming concepts, then launched straight into the basics of the Python programming language. We worked with an open-ended curriculum: starting with simple math and strings operations, working up to logic and functions, then writing and running scripts. This meant that we were able drop some things off at the end when we ran out of time (which we did - objects/classes did not make the final cut).
The entire program was very hands-on - almost every section contained examples or exercises that could be run in the Python interpreter.
One recurring problem that comes up when teaching Python, though, is showing beginning students how to save and execute scripts. I like students to understand as closely as possible what it will be like to work with Python in a real working environment, but introducing beginners to scripting can be difficult for a number of mundane reasons:
- many beginners don’t have a clear understanding of their file system, how to navigate it or where things are located
- when students bring their own laptops, there will be a variety of different operating systems and text editors at play
With enough time and volunteers, it’s certainly possible to teach everyone the basics of file systems and walk every student through working with different text editors, saving and navigating to files, etc. But in our case we didn’t have enough time or bodies, so we used Appsoma.com for writing/running scripts. Appsoma is a relatively new browser-based app development platform, but it also makes a terrific free tool for practice and learning. (To get an idea of its capabilities, head to the Code tab where you can create, save and run a script.)
Some of the other key things we did to facilitate learning included:
Arranging students in small work groups. Our students came from a variety of backgrounds, some with experience in other programming languages and some with no programming experience at all. Seating them in groups of 5-6 allowed them to get to know each other and made it easier for them to help each other. We also encouraged group collaboration on some of the more difficult exercises. This student bonding led to some great friendships by the end of the class. Some students have already made plans to get together and practice, and it’s my belief that these students, now that they know each other, are more likely to continue learning because they’ll be motivating and helping each other.
Plan for follow-up. It was a happy scheduling accident that the next Coursera Python class starts just about a week after this one, so we encouraged students to sign up and then come back to our next scheduled hack night to get help. We also emphasized the hack nights on their own as a place to come back and participate with some guidance.
My slides from this class can be found here: https://github.com/pyladiesatx/pyladiesatx/tree/master/resources/IntroToPython
Feel free to fork and remix these slides for your own classes. The repository includes:
- a PDF of the setup instructions (how to install Python and get to a prompt for Windows, Linux and OS X)
- a Keynote source file of the main slide deck
- a PowerPoint export of the Keynote slides (there may be some errors)
- a PDF of the main slide deck
Some things I’d like to add for the next class:
- An introduction to code blocks and more discussion of indentation (and possibly how code blocks are handled in other languages), before introducing topics like if/else, loops, and functions
- More discussion of objects and classes - we skipped it entirely this time because of time constraints, but I’d like to find a way to work them in
- More structured exercises (not every section had them this time) so that students can also get a little more experience with problem-solving