56. Programming 2 : Random Number Generation

56. Programming 2 : Random Number Generation

9th Grade

10 Qs

quiz-placeholder

Similar activities

Chapter 5

Chapter 5

9th Grade

10 Qs

Sequence and selection

Sequence and selection

9th - 10th Grade

11 Qs

Code.org Unit 6 - Lists

Code.org Unit 6 - Lists

9th - 12th Grade

12 Qs

Math Extra Credits

Math Extra Credits

9th - 12th Grade

14 Qs

CPU and Von Neumann Architecture Quiz

CPU and Von Neumann Architecture Quiz

8th Grade - University

10 Qs

Encryption 2

Encryption 2

8th - 10th Grade

10 Qs

SST 3 COUNT Randbetween Mode.SNGL

SST 3 COUNT Randbetween Mode.SNGL

9th Grade

10 Qs

CS 2.01-2.05 Review

CS 2.01-2.05 Review

9th - 12th Grade

14 Qs

56. Programming 2 : Random Number Generation

56. Programming 2 : Random Number Generation

Assessment

Passage

Computers

9th Grade

Hard

Created by

Andy Workman

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the first step in generating random numbers in a Python program?

Writing a loop

Importing the random library

Using an if statement

Declaring variables

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What range of numbers does the example Python code generate for simulating a dice roll?

0 to 5

1 to 6

2 to 7

1 to 5

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In pseudocode for exams, how is a random number between 2 and 5 generated?

random_int(2, 5)

generateRandom(2, 5)

RANDOM_NUM(2, 5)

RANDOM_INT(2, 5)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the nature of computers that makes generating true random numbers challenging?

Static

Dynamic

Deterministic

Non-deterministic

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What type of random numbers is usually sufficient for most applications?

True random numbers

Pseudo-random numbers

Sequential numbers

Fixed numbers

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a seed value used for in pseudo-random number generation?

To create a fixed pattern

To decrease the randomness

To alter the list of random numbers generated

To generate the same sequence of numbers

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the UNIX epoch time?

The time since the computer was turned on

The current time in milliseconds

The time it takes to execute a program

The number of seconds since January 1, 1970

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?