Random Number Generation Flashcards

You may prefer our related Brainscape-certified 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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How can random numbers be used to make random selections?

A

If statements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly