Search Header Logo
Random number

Random number

Assessment

Presentation

•

Computers

•

10th Grade

•

Practice Problem

•

Medium

Created by

KANGNI AMOUZOUGAN

Used 1+ times

FREE Resource

5 Slides • 4 Questions

1

media

2

media

3

Multiple Choice

Which of the following best describes the random numbers generated by computers?

1

They are truly random and unpredictable.

2

They are pseudorandom, generated by algorithms.

3

They are always the same each time.

4

They are based on user input.

4

media

5

Multiple Choice

Which Python function would you use to simulate rolling a six-sided die?

1

random.choice([1,6])

2

random.randint(1,6)

3

random.random()

4

random.shuffle([1,2,3,4,5,6])

6

media

7

Multiple Choice

Which Python function would you use to randomly select True or False for a coin flip simulation?

1

random.randint(0,1)

2

random.choice([True, False])

3

random.random()

4

random.shuffle([True, False])

8

media

9

Multiple Select

Select all Python functions that can be used to generate random values.

1

random.randint(a, b)

2

random.choice([True, False])

3

random.random()

4

random.sort()

pattern-tertiary
media

Show answer

Auto Play

Slide 1 / 9

SLIDE