fbpx

Hello, World! in Scratch

The Code

How it Works

  • The orange block runs when a certain event happens — in this case, when the green flag is clicked
  • An instruction that modifies the current sprite’s “Looks” is run  — in this case, to tell the sprite to say “Hello, World!”

Scratch code does not get run directly by a computer, it has to be executed by the Scratch “platform”. It either has to be run online in a web-browser at https://scratch.mit.edu/; or run offline using Adobe Air.

In case you’re wondering, version 2 of the Scratch platform itself is written in ActionScript. Version 3, released in 2018, is written using HTML 5.

Why Use Scratch

Scratch is a perfect language for teaching the fundamentals of coding because minimal typing is required and the visual element is easier to construct programming ideas without having to understand “syntax” (the specific rules that define how symbols and instructions are written out). The visual elements also makes creating games, stories, and animations much more natural compared to “traditional” programming languages.

Limitations

Scratch programs must be run inside the Scratch platform; you can’t run it “directly” on the computer; which also means it has limitations on how much interaction it can have with the rest of the computer, such as accessing networks and storage. Complex programs with Scratch are difficult to work with due to the visual blocks (i.e. it’s the weakness of it’s strength) and is relatively slow to run.

Share this post!

join the coding club!

Sign up to be the first to know about new classes and promos!