Python Random

Python Random

12th Grade

10 Qs

quiz-placeholder

Similar activities

PMBOK Quiz

PMBOK Quiz

KG - University

10 Qs

Revision Gr2-2025

Revision Gr2-2025

3rd Grade - University

12 Qs

Programing test

Programing test

1st Grade - University

10 Qs

After Effect Intoduction

After Effect Intoduction

10th Grade - University

15 Qs

Linux: Users and Groups

Linux: Users and Groups

9th Grade - University

14 Qs

OOP 1 Undiksha

OOP 1 Undiksha

12th Grade - University

13 Qs

Chapter 3 Exploring Linux Filesystems

Chapter 3 Exploring Linux Filesystems

11th Grade - University

10 Qs

Review I-PM Ujikom Multimedia

Review I-PM Ujikom Multimedia

12th Grade

10 Qs

Python Random

Python Random

Assessment

Quiz

Computers

12th Grade

Hard

Created by

Thomas Martinez

FREE Resource

AI

Enhance your content

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

To include the use of functions which 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

Media Image

The output of the above Python code is either 1 or 2.

True

False

error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the above Python code?

An integer other than 2, 3 and 4

Either 2,3 or 4

Error

3 only

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of above given code

Error

Either 10.4, 56.99 or 76

Any number other than 10.4, 56.99 and 76

56.99 only

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python function (random module has already been imported)?


random.choice('sun')

sun

u

either s,u or n

error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python function, assuming that the random module has already been imported?


random.uniform(3,4)

error

either 3 or 4

Any integer other than 3 and 4

Any decimal value between 3 and 4

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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


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

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?