Python

Python

Random has 9 Questions
What the does random.seed(3) return?

True
None
3
1
Which of the following cannot be returned by random.randrange(4)?

0
3
2.3
none of the mentioned
Which of the following is equivalent to random.randrange(3)?

range(3)
random.choice(range(0, 3))
random.shuffle(range(3))
random.select(range(3))
The function random.randint(4) can return only one of the following values. Which?

4
3.4
error
none of the mentioned
Which of the following is equivalent to random.randint(3, 6)?

random.choice([3, 6])
random.randrange(3, 6)
3 + random.randrange(3)
3 + random.randrange(4)
Which of the following will not be returned by random.choice("1 ,"?)?

1
(space)
,
none of the mentioned
Which of the following will never be displayed on executing print(random.choice({0: 1, 2: 3}))?

0
1
KeyError: 1
none of the mentioned
Which type of elements are accepted by random.shuffle()?

strings
lists
tuples
integers
What is the range of values that random.random() can return?

[0.0, 1.0]
(0.0, 1.0]
(0.0, 1.0)
[0.0, 1.0)