Question
a.
range(3)
b.
random.choice(range(0, 3))
c.
random.shuffle(range(3))
d.
random.select(range(3))
Posted under Python
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. Which of the following is equivalent to random.randrange(3)?
Similar Questions
Discover Related MCQs
Q. The function random.randint(4) can return only one of the following values. Which?
View solution
Q. Which of the following is equivalent to random.randint(3, 6)?
View solution
Q. Which of the following will not be returned by random.choice(“1 ,”)?
View solution
Q. Which of the following will never be displayed on executing print(random.choice({0: 1, 2: 3}))?
View solution
Q. What does random.shuffle(x) do when x = [1, 2, 3]?
View solution
Q. Which type of elements are accepted by random.shuffle()?
View solution
Q. What is the range of values that random.random() can return?
View solution
Q. Which of the following functions can help us to find the version of python that we are currently working on?
View solution
Q. Which of the following functions is not defined under the sys module?
View solution
Q. The output of the functions len(“abc”) and sys.getsizeof(“abc”) will be the same. State whether true or false.
View solution
Q. What does os.name contain?
View solution
Q. What does print(os.geteuid()) print?
View solution
Q. What does os.getlogin() return?
View solution
Q. What does os.close(f) do?
View solution
Q. What does os.fchmod(fd, mode) do?
View solution
Q. Which of the following functions can be used to read data from a file using a file descriptor?
View solution
Q. Which of the following returns a string that represents the present working directory?
View solution
Q. What does os.link() do?
View solution
Q. Which of the following can be used to create a directory?
View solution
Q. Which of the following can be used to create a symbolic link?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Python? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!