Search Header Logo

Lesson 5 Assessment Quiz 1

Authored by Whizara Teacher

Computers

4th - 12th Grade

Lesson 5 Assessment Quiz 1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

To include the use of functions that are present in the random library, we must use the option:

 import random

random.h

import.random

random.random

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following cannot be returned by the following statement?

random.randrange(4)?

0

4

2.3

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The function random.randint(4) can return only one of the following values. Which?

4

3.4

error

5

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following if the random module has already been imported?

print (random.randint(3.5, 7))

Error

Any integer between 3.5 and 7, including 7

Any integer between 3.5 and 7, excluding 7

The integer closest to the mean of 3.5 and 7

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What cannot be the output of the following if the random module has already been imported?

print(random.randint(21, 56))

21

56

90

34

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?