Advancers – Week 9 (2023 – 2024)

Programming

This week we created our very own programming language in Scratch.

It reads a list of commands and does what it’s told.

It only understands a few commands:

M = Move
T = Turn
X = Go To X
Y = Go To Y
P = Pen Up or Down
C = Change colour

The Lines in the list have to be in the right format for the code to work. The right format is the Single Letter for the command followed by a colon (:), followed by a Parameter, if the command needs it. For example this command:

M:10

Tells the code to M(ove) 10 steps.

Spirals – To create a list of Commands.

We also spent some time updating the Spirals project so that it could create a List of Commands that could be used by the Programming project to draw the same Spiral.

Export/Import a List

We also experimented with the Export List and Import List options in Scratch to move lists of Commands in and out of different Projects. So for Example you could:

1: Open the Spirals Project.
2: Run a Spiral to add entries to the List.
3: Right Click on the List and Export it to a file.
4: Open the Programming Project.
5: Right click on the List and Import the file you created in step 3.
6: Run the Programming project and it will draw the same spiral.

See it in Action.

Both the Programming Project and the Spirals project that can generate a List have been loaded up to the Scratch Web Site (https://scratch.mit.edu), you should be able to see them without connecting by using the following links:

ClassVersion-Programming https://scratch.mit.edu/projects/953994281/
ClassVersion-Spirals-Programming https://scratch.mit.edu/projects/953995854

If you want to connect and upload your own projects you can use the following details:
username : athenryadvancers
Password : Advancers


Leave a comment