1. Scratch – Variables, Input, Output

What is Scratch:

Scratch is a high-level block-based visual programming language. It is an educational tool to teach young people the fundamentals of programming.​


Sequence:

In programming, sequence is when one thing happens after another in order. During this lesson, you will use blocks of code that happen in sequence.​​


Variables:

variable is a named memory location that can store values.​

Those values can change during the running of a program


Variable Examples:

variable is a named memory location that can store values.​

Take a look at the image below – Super Mario World involves lots of variables. EG: Score, Coins, Lives are all variables – they store values that change whilst the game runs.

 


Output:

Output (say blocks in scratch) allow for information to be displayed to the user. ​

 


Input:

User Input is used to allow the user of the program to enter values.​

  • The program asks the user a question and waits for a response.​
  • The user enters the information.​
  • The information is then stored as a variable.