Saturday, May 28, 2011
Scratch Random Numbers
Welcome to our Random Numbers Tutorial in Scratch.
Click the Green Flag to start the guys making some numbers, and then keep clicking the green flag to go again.
This tutorial shows a variety of ways we can make Random Numbers using Scratch. These numbers are handy to use in games we make to create interest and unpredictability.
The following YouTube video shows how our Random Numbers project was built.
Note that by adjusting the bottom right hand controls, it can be viewed full screen in HD. (Press Escape to return to this blog page when finished).
Here are the variables that need to be created for this project.
Here is the Scripting for the Cat, who says numbers between 1 and 20.
The following is the scripting for the Starfish, who also creates numbers bewtween 1 and 20, but includes inbetween values like 6.5 and 17.5.
The script for the Squirrel creates numbers between 1 and 30 that are multiples of 3.
If you want to use our background to build your project, then here it is.
(Click on the picture and use your browser's save function, and then back arrow to return to this page).
As a challenge, modify this project to do the following:
The Cat says numbers between 20 and 40
The Starfish says numbers between 10 and 20 that have decimal values in one quarter increments such as:
10, 10.25, 10.5, 10.75, 11, 11.25.......19, 19.25, 19.5, 20
The Squirrel says numbers between 10 and 100 that are multiples of 10 such as: 10, 20, 30, 40, ......... 90, 100
Make sure you give our tutorials a go, by downloading and installing the Scratch Development Environment for free on your PC from the following link:
You'll definitely have some fun getting into random situations with Scratch.
Big Passy Wasabi