gs gs109 Python Modules - Python Random Module - Quiz No.2
gs gs109 Python Quiz
This quiz belongs to book/course code gs gs109 Python of gs organization. We have 134 quizzes available related to the book/course Python. This quiz has a total of 10 multiple choice questions (MCQs) to prepare and belongs to topic Python Modules. NVAEducation wants its users to help them learn in an easy way. For that purpose, you are free to prepare online MCQs and quizzes.
NVAEducation also facilitates users to contribute in online competitions with other students to make a challenging situation to learn in a creative way. You can create one to one, and group competition on an topic of a book/course code. Also on NVAEducation you can get certifications by passing the online quiz test.
Question 5: What will be the output of the following Python function, assuming that the random library has already been included?
random.shuffle[1,2,24]
Randomized list containing the same numbers in any order
The same list, that is [1,2,24]
A list containing any random numbers between 1 and 24
Error
Question 6: What the does random.seed(3) return?
True
None
3
1
Question 7: Which of the following cannot be returned by random.randrange(4)?
0
3
2.3
none of the mentioned
Question 8: 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))
Question 10: 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)