Random Number Generation Flashcards
1
Q
What are Random Numbers used for?
A
When the programmer wants the number to be unknown
e.g. random(x,y)
this generates a number between x and y
2
Q
How can random numbers be used to make random selections?
A
If statements
3
Q
How can random numbers be used for arrays?
A
Generate a random number and use it to pick a random item from a list