Zebra0.com

alice randomAlice Programming

Alice Programming

Learn Alice in FREE step-by-step lessons.

Module 16: Random Numbers

In this nodule you will learn more about random variables.
We can use random numbers in many ways.
One thing we can do with random users is to flip a coin or select a card from a deck. Those are things that we think of as random.
We can also use random numbers to make movement seem more natural.
When a person jumps up and down, they don't jump exactly the same amount each time, so we could have them jump a random amount within a range.

Goal:

In order to do this you will:

Objectives:

Print the lesson

Please study the material at each of the links below.

  1. Displaying some random values Displaying some random values: Uses textModel to display a random double value between 0 and 1.
    /alice/videos/alice-random.mp4

  2. Displaying values from 1 to 6 Displaying values from 1 to 6: A random integer from 1 to 6 inclusive to roll die
    /alice/videos/alice-randomdie.mp4
  3. Panda Turns a Random Amount Panda Turns a Random Amount: A random double
    /alice/videos/alice-panda-random.mp4
  4. A Counting Quiz A Counting Quiz: How many fish do you see? (Some of the fish are invisible.)
    /alice/videos/alice-counting-quiz.mp4
  5. Addition Quiz: Bears ask you to add numbers, then tells how many you got right.

  6. Guess the Aliens number: Loops until the user guesses the number: give hints "too high" and "too low"

  7. A Penguin Jumps Up and Down A Penguin Jumps Up and Down: Use a random value each time he jumps to make it look more realistic.
    /alice/videos/alice-penguin-jumps.mp4
  8. A Fish swims back and forth A Fish swims back and forth: Random numbers for the distance to swim makes it more realistic.
    /alice/videos/alice-fish-back-forth.mp4
  9. Self Study Questions Self Study Questions: What have you learned?

  10. Discussion questions Discussion questions: What do you think?

  11. Self Study Questions

  12. Discussion Questions Discussion Questions

Active Learning

Create a soccer match

GlossaryGlossary for random lesson
Full Glossary