Education Programming

Python Programming With Little Stemettes

hamster eating grape
Credit: Flickr / Marina Avila

Slightly last minute, I found myself putting together a workshop in python for a Stemettes event. The constraints:

  1. It has to be in python.
  2. I don’t really code in python much (light scripting, which I don’t do much of).
  3. It has to relate to banking.
  4. There are lots of people coming to help.
  5. These people do not know how to code.
  6. The girls know about if statements and variables.
  7. The workshop starts at 1pm.
  8. The time was: 11pm the night before.

I opted to make a simple banking app. There’s a BankAccount object (defined for the girls), and a loop, they can opt to pay in, withdraw, or just show the balance. I put the initial code to start with on pastebin, and made an exercise sheet with the basics and optional extras.

If I’d had TAs with programming experience, I could have left it there. But since the helpers didn’t know how to code, I needed to give them a little help themselves. I made a complete answer  which included all the extras (also on pastebin) and a cheat sheet which linked each task to a line in the code.

The Event

What Went Well

I think overall, the exercise went pretty well.

We used PythonAnywhere, which was great because windows laptops were provided (which I hate), and we could just stay in the web-browser. It essentially runs a terminal, but in a web-browser which seems less scary! (Only one computer had problems – it wasn’t rendering a full terminal but just one line, which made it really hard to see what was going on).

I think, giving the helpers the cheat sheet was at least better than nothing. It gave them a starting point! I gave them a brief overview up front, and emphasised that the best thing was to stay calm and keep the girls calm and not let them despair when it doesn’t work right away.

What I Would Change

Time was running out when I realised I hadn’t added enough comments to the solution – of course this was after I had painstakingly pulled out all the line numbers! I didn’t have time to fix it.

I didn’t anticipate that the girls wouldn’t be used to the boilerplate I provided for them. I could have removed some of it.

I should have included some definitions with the exercise (e.g. how to read input from the command line).

I wish I’d had more time to talk about the exercise up front. For example control flow – a lot of the time the girls had put the right code… in the wrong place. And types – there was much confusion between strings, and numbers, and numbers as strings.

Really, with the amount of experience the girls had we didn’t have enough time for this – about 2 hours, with nearly 30 minutes wasted in setting up the computers and getting set up with PythonAnywhere. This could be an all day (~4-6 hour) workshop, as none of them completely make it through the core tasks.

It never occurred to me to tell the girls to use Chrome rather than IE. Really have to remember to do that, IE causes so many problems, not least because I never use it and I need to be able to fix things quickly when I come around to help!

Post-Event Observations

The day was a bit of an emotional rollercoaster, and I mostly got to spend time with the groups when they were stressed about something that was broken. So I’d get to the group and they’d be all “oh no it’s a disaster we’re behind everyone” and then I would sort them out (“;” instead of “:”, line in the wrong place) and then it would be “yay!” and they would totally forget I was there.

With the limited time, I was going in a strict loop around all the groups. When they had an issue, I would typically just fix it for them – we lacked time to talk them through doing it themselves (I would tell them what I did, and play it down as just a tiny problem). At the end when they talked about the challenges they had faced a number of them talked about a particularly persistent problem (and line number!) but none of them talked about “we got Cate to fix it”, they talked about “we fixed it… this is what was wrong”. I could feel slightly unappreciated by that, but really it’s good that they feel like they fixed it.

One interesting observation I had was when I was writing the code, I put in a bunch of validation. It’s like a habit for me! Of course the pin needed to be at least 4 characters, and the name needed to not be empty. It never seemed to occur to the girls to worry about this, they were always very nice to their program and put in what they thought it wanted.

Things That Made Me Happy

When the girls presented their projects, they seemed really proud of what they had made. I asked some of the groups what they had learned, and was happy to hear them talk about perseverance.

A female science teacher had come with the girls and she was so enthusiastic about learning to write code – this made my day.

One team went off the list and wrote some random stuff instead of the task list, but they were super creative about it.

Things That Made Me Sad

How many of them seemed to freak out at the talk of “doing math”. There wasn’t really any math involved… simple addition and subtraction, that the computer does.

Seeing fixed mentalities rather than growth mentalities – the conclusion that because it doesn’t work, they can’t do it, rather than they haven’t figured out how to do it yet.

You can find all my materials linked above – feel free to use, modify, repurpose! And if you do, I’d love to hear how it goes.

8 replies on “Python Programming With Little Stemettes”

Hi Cate,

Just a great big thank you for last Friday. The girls are still buzzing! I think it has changed some of their minds about careers in technology and the extent to which they can solve problems. They will always appreciate you, but won’t always acknowledge you! They all learned a lot and it reminded me that just because they can understand how to do it in February, it doesn’t mean that can then do it in June!!

“Seeing fixed mentalities rather than growth mentalities – the conclusion that because it doesn’t work, they can’t do it, rather than they haven’t figured out how to do it yet.” This is something that I try to work on constantly – I find myself feeling mean at times and biting my tongue not giving them the answer, but to help them to make mistakes and solve their own problems. It is too common and I wish I had a solution.

Still, thanks so much again for all of your hard work, it is so appreciated.


[WORDPRESS HASHCASH] The poster sent us ‘0 which is not a hashcash value.

Oh amazing! I’m so glad they had a good time. “They will always appreciate you, but won’t always acknowledge you!” – that is hilarious (and I believe you!)

The fixed mentality is so ingrained by society that praises girls for being pretty and smart and boys for being strong and hardworking. It’s really hard for one teacher to change that! But it is a huge problem when trying to code – I still often don’t know the answer, but I have to think I’ll figure it out otherwise what am I going to do all day?

I don’t know how we change it! But I’m glad you are trying.

[WORDPRESS HASHCASH] The poster sent us ‘0 which is not a hashcash value.

Comments are closed.