Refer to CBSE Class 11 Computer Science Random Function MCQs provided below available for download in Pdf. The MCQ Questions for Class 11 Computer Science with answers are aligned as per the latest syllabus and exam pattern suggested by CBSE, NCERT and KVS. Multiple Choice Questions for Random Function are an important part of exams for Class 11 Computer Science and if practiced properly can help you to improve your understanding and get higher marks. Refer to more Chapter-wise MCQs for CBSE Class 11 Computer Science and also download more latest study material for all subjects
MCQ for Class 11 Computer Science Random Function
Class 11 Computer Science students should refer to the following multiple-choice questions with answers for Random Function in Class 11.
Random Function MCQ Questions Class 11 Computer Science with Answers
Question. What does the following statement do?
import random
a) Imports the random module
b) Imports a random module from a list of modules
c) Imports the random function
d) imports the directory named random
Answer : A
Question. What will be the output after the following statements?
from random import
x = [0, 2, 4, 6, 8, 10]
print(sample(x, 3))
a) A dictionary containing 3 random keys from list x
b) Three random integer values between 0 and 10
c) A list containing 3 random elements from list x
d) A tuple containing 2 random elements from list x
Answer : C
Question. What will be the output after the following statements?
import random
x = [3, 8, 6, 5, 0]
y = random.shuffle(x)
print(y)
a) A random element from the list x
b) The shuffled list x with the elements mixed up
c) None
d) A random element from the list x, excluding 3 and 0
Answer : C
Question. What will be the output after the following statements?
import random
print(random.sample(range(5, 20), 4))
a) A list of 5 unique numbers within the range of 4 to 19
b) A list of 5 unique numbers within the range of 5 to 20
c) A list of 4 unique numbers within the range of 5 to 19
d) A tuple of 4 unique numbers within the range of 5 to 19
Answer : C
Question. What is the output of the code shown below?
import random
random.choice(2,3,4)
a) An integer other than 2, 3 and 4
b) Either 2, 3 or 4
c) Error
d) 3 only
Answer : B
Question. The output of the following Python code is either 1 or 2.
import random
random.randint(1,2)
a) True
b) False
c) none
d) Error
Answer : A
Question. What will be the output after the following statements?
import random as rd
print(rd.randint(4,7))
a) A random float value between 4 and 7, including 4 and 7
b) A random float value between 4 and 7, excluding 4 and 7
c) A random integer value between 4 and 7, excluding 4 and 7
d) A random integer value between 4 and 7, including 4 and 7
Answer : D
Question. What will be the output after the following statements?
import random
x = [3, 8, 6, 5, 0]
random.shuffle(x)
print(x)
a) A random element from the list x
b) The shuffled list x with the elements mixed up
c) A random element from the list x, excluding 3 and 0
d) A random element from the list elements 3 and 0
Answer : B
Question. What will be the output after the following statements?
import random
print(random.sample(range(20), 5))
a) A list of 5 unique numbers within the range of 0 to 19
b) A list of 5 unique numbers within the range of 0 to 20
c) A list of 4 unique numbers within the range of 0 to 19
d) A tuple of 5 unique numbers within the range of 0 to 19
Answer : A
Question. To include the use of functions which are present in the random library, we must use the option:
a) import random
b) random.h
c) import.random
d) random.random
Answer : B
Question. What is the output of the function shown below if the random module has already been imported?
>>>import random
>>>random.randint(3.5,7)
a) Error
b) Any integer between 3.5 and 7, including 7
c) Any integer between 3.5 and 7, excluding 7
d) The integer closest to the mean of 3.5 and 7
Answer : B
Question. What will be the output after the following statements?
import random as rd
print(rd.random())
a) A random float value between 0 and 1
b) A random integer value between 0 and 1
c) A random float value between 0 and 10
d) A random integer value between 0 and 10
Answer : A
Question. What will be the output after the following statements?
import random
print(int(random.random()*10))
a) 10
b) A random integer number within the range of 0 to 9
c) None
d) A random floating point number within the range of 0 to 9
Answer : B
Question. What is the output of the program given below:
import random
x = random.random()
y= random.randint(0,4)
print(int(x),”:”, y+int(x))
a) 0: 0
b) 2 : 4
c) 1: 6
d) 0 : 5
Answer : A
Question. Which type of elements are accepted by random.shuffle()?
a) strings
b) Lists
c) tuples
d) integers
Answer : B
Question. Which of the following can be a possible output after the following statements?
from random import
print(sample(range(0,10), 3))
a) [4, 11, 30]
b) [3, 15, 10]
c) [1, 5, 7, 4]
d) [1, 5, 0]
Answer : D
Question. What will be the output after the following statements?
import random
print(int(random.random()*10) + 1)
a) 11
b) A random integer number within the range of 0 to 11
c) None
d) A random whole number within the range of 1 to 10
Answer : D
Question. What is the output of the function shown below (random module has already been imported)?
>>>random.choice(‘sun’)
a) sun
b) u
c) either s, u or n
d) Error
Answer : C
Question. What will be the output after the following statements?
import random
x = [3, 8, 6, 5, 0]
print(random.choice(x))
a) A random element from the list x
b) The list x
c) A random element from the list x, excluding 3 and 0
d) A random element from the list elements 3 and 0
Answer : A
Question. What will be the output after the following statements?
import random
x = [‘Monday’, ‘Tuesday’, ‘Wednesday’, ‘Thursday’, ‘Friday’,
‘Saturday’, ‘Sunday’]
print(x[random.randint(0, len(x) – 1)])
a) IndexError
b) A random day from all the seven days
c) A random day from all the days except Sunday
d) A random day from all the days except Monday
Answer : D
CBSE Class 11 Computer Science Advanced Scripting MCQs |
CBSE Class 11 Computer Science Animation Tool MCQs Set A |
CBSE Class 11 Computer Science Animation Tool MCQs Set B |
CBSE Class 11 Computer Science Basic Ubuntu Linux Commands MCQs |
CBSE Class 11 Computer Science Boolean Algebra MCQs |
CBSE Class 11 Computer Science Computer Hardware MCQs |
CBSE Class 11 Computer Science Computer Organisation MCQs |
CBSE Class 11 Computer Science Conditional Statement MCQs |
CBSE Class 11 Computer Science Creating Animation Using Synfig MCQs |
CBSE Class 11 Computer Science Current Trends and Technologies MCQs |
CBSE Class 11 Computer Science Dictionary in Python MCQs |
CBSE Class 11 Computer Science Forms and Reports MCQs |
CBSE Class 11 Computer Science Fundamentals of Computer MCQs |
CBSE Class 11 Computer Science Introduction To Database Management System MCQs |
CBSE Class 11 Computer Science Introduction To Layers MCQs |
CBSE Class 11 Computer Science Introduction To Multimedia MCQs Set A |
CBSE Class 11 Computer Science Introduction To Multimedia MCQs Set B |
CBSE Class 11 Computer Science List Manipulation MCQs |
CBSE Class 11 Computer Science Python Revision MCQs |
CBSE Class 11 Computer Science Random Function MCQs |
CBSE Class 11 Computer Science Retrieve Data Using Queries MCQs |
CBSE Class 11 Computer Science Society Law and Ethics MCQs |
CBSE Class 11 Computer Science Software and Operating System MCQs |
CBSE Class 11 Computer Science String and Function MCQs |
CBSE Class 11 Computer Science Using Pictures In Synfig MCQs |
CBSE Class 11 Computer Science Vim Editor and Basic Scripting MCQs Set A |
CBSE Class 11 Computer Science Vim Editor and Basic Scripting MCQs Set B |
CBSE Class 11 Computer Science Working With Table MCQs |
MCQs for Random Function Computer Science Class 11
Expert teachers of studiestoday have referred to NCERT book for Class 11 Computer Science to develop the Computer Science Class 11 MCQs. If you download MCQs with answers for the above chapter you will get higher and better marks in Class 11 test and exams in the current year as you will be able to have stronger understanding of all concepts. Daily Multiple Choice Questions practice of Computer Science will help students to have stronger understanding of all concepts and also make them expert on all critical topics. After solving the questions given in the MCQs which have been developed as per latest books also refer to the NCERT solutions for Class 11 Computer Science. We have also provided lot of MCQ questions for Class 11 Computer Science so that you can solve questions relating to all topics given in each chapter. After solving these you should also refer to Class 11 Computer Science MCQ Test for the same chapter.
You can download the CBSE MCQs for Class 11 Computer Science Random Function for latest session from StudiesToday.com
Yes, the MCQs issued by CBSE for Class 11 Computer Science Random Function have been made available here for latest academic session
You can find CBSE Class 11 Computer Science Random Function MCQs on educational websites like studiestoday.com, online tutoring platforms, and in sample question papers provided on this website.
To prepare for Random Function MCQs, refer to the concepts links provided by our teachers and download sample papers for free.
Yes, there are many online resources that we have provided on studiestoday.com available such as practice worksheets, question papers, and online tests for learning MCQs for Class 11 Computer Science Random Function