I often find that I’m having to jump around between Scratch, Python and PICAXE Basic. It’s quite easy to get tangled with the different structures – I keep putting in a # for a PICAXE comment, and the odd colon here and there. Colons in PICAXE are used for labels, not at the end of looping and conditional branches. So… here’s a quick chart which also covers some GPIO stuff.
Just as you get used to one programming language, the goalposts change and you need another one! This little guide sheet, on two A4 pages, covers the basics of using variables, decisions, lists and loops.
It has been written for Python 3 (the most commonly encountered difference is the need to put brackets around bits that need printing).
I’m going to keep a printed version with me as I’m sure it’ll be useful for explaining the different ways of constructing decisions and loops.
If I get the time, I’ll create pages 3 & 4 – perhaps to cover using GPIO within Scratch and Python.