So going from visual programming like Scratch to a text-based language can intially seem a bit lame. Yep, that makes sense to me. We’ve just gone from something that lets us drag blocks into a window with spinning monkeys and bouncing balls, to…typing words, that makes a few words come up on the screen, or draws a boring star.
The other thing that made this change kind of suck, is that things don’t work nearly as easily as Scratch does, at first.
In term 1, grade 6 people who were in Code Club last year, went through some Python concepts.
The activities we had a go at were:
Using a text editor e.g. notepad, in Windows, we went through the inventwithpython guess the number exercise. We discovered that the Macbooks’ Windows defaulted to Python 2, which we later fixed by running our scripts from the cmd prompt using:
py -3 <ourfile.py>.
Some people had a go at copying and pasting the code and soon found out that this changed formatting as well as copying the line numbers.
Last year our Code Club attempts with Python and IDLE were a bit frustrating. Well more frustrating than this year at least :). I noticed that a few things were a bit hard to read and didn’t show up properly, so I’ve fixed those.
So put this cheat sheet next to you while going through the Code Club Python activities. It relates to MacOSX, Windows, or Linux (we’ve used Raspberry Pis for our Dexter Industries BrickPi EV3, GoPiGo, and Minecraft Python sessions).