Randomness

Random Number Generator

We can generate a random number in Scratch between any two numbers (inclusive) using the pick random block:

This will report an integer 1, 2, 3, 4, 5, 6, 7, 8, 9, or 10—each with 1/10 probability. This type of block (with the round edges) is a reporter block—it reports a value. We can use this block inside other blocks that take a value:

In other words, a reporter block can be used in any case that a manually entered value or variable can. You can even use pick random blocks as the parameters to other pick random blocks:

What do you think this complex combination of blocks does?

Instructions

Your job is to make a sprite move around the screen randomly. Load your Scratch program from Game of Tag, and adjust it as follows:

  1. Make one character move around randomly, but still stay within the confines of the screen. You can do this with the if on edge, bounce block.
  2. Use pick random to change the second sprite’s appearance. You can vary many different factors in the “Looks” tab, including size, costume, as well as many colorizing and distorting effects.
  3. Be personalized in at least three ways.
  4. Be usable, efficient, and effective.
  5. Provide documentation (describe what it does) in the Instructions. Be sure to describe how your program is original.