variables

Variables

Variables are used to store information for use in programs.

Scratch can store only numeric values in a variable which can be dropped in to any program block space with an oval shape. Make a variable in the variables page and set the tick box depending on whether you want to allow the user to view and change the value.

Variables

Variables were briefly introduced in the session on turtle graphics and are a fundamental part of Scratch and computer programming in general. Variables are introduced as simple numbers which can be made available to the whole application or kept private for a particular sprite. The speed of a sprite might be a private variable whereas the score in a game might be available to all sprites.

Syndicate content