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

**random.choice(‘sun’)**

a) sun

b) u

c) either s, u or n

d) error

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

**random.uniform(3,4)**

a) Error

b) Either 3 or 4

c) Any integer other than 3 and 4

d) Any decimal value between 3 and 4

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

**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

**74. Which of the following functions helps us to randomize the items of a list?**

a) seed

b) randomise

c) shuffle

d) uniform

**75. What will be the output of the following Python code?**

**random.seed(3)**

**random.randint(1,5)**

**2**

**random.seed(3)**

**random.randint(1,5)**

a) 3

b) 2

c) Any integer between 1 and 5, including 1 and 5

d) Any integer between 1 and 5, excluding 1 and 5

**76. What is the interval of the value generated by the function random.random(), assuming that the random module has already been imported?**

a) (0,1)

b) (0,1]

c) [0,1]

d) [0,1)

**77. What will be the output of the following Python code?**

**random.randrange(0,91,5)**

a) 10

b) 18

c) 79

d) 95

**78. Both the functions randint and uniform accept ____________ parameters.**

a) 0

b) 1

c) 3

d) 2

**79. The randrange function returns only an integer value.**

a) True

b) False

**80. What will be the output of the following Python code?**

**random.randrange(1,100,10)**

a) 32

b) 67

c) 91

d) 80

**Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 **

**Python Interview Questions (MCQs)**

We have divided these Python Questions and Answers into various parts based on the topics. Open the Topic of your choice and Practice these MCQs.