CRCD.T1.M2.04: Random Numbers
Random Numbers
Question of the Day
How can we make our programs behave differently each time they are run?
Answer: Use random numbers, a variable that is updated multiple times in the program.
Objectives
Students will be able to:
- Generate and use random numbers in a program
- Update a value stored in a variable
Vocabulary
- Using Random Numbers The randomNumber() block can be used to generate random numbers in your programs. The parameters set the minimum and maximum value that could be generated. You can use this block anywhere that you could write a number. This example is like a die that could randomly generate any number from 1 to 6.
New Code