CBSE Class 11 Computer Science Question 30 of 63

Introduction to Python Modules — Question 11

Back to all questions
11
Question

Question 11

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

  1. import random
  2. random.h
  3. import.random
  4. random.random
Answer

import random

Reason — To use functions from the random library in Python, we must include the line import random at the beginning of code.