
Вопросы по модулю random
Authored by Ерасыл Тлеудин
Computers
12th Grade
Used 5+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function from the random module returns a random number between 0 and 1 (excluding 1)?
randint
random
randrange
choice
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function selects a random element from a list?
randint
sample
choice
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the shuffle function do?
Shuffles the list in place
Selects a random element from the list
Returns a random number between 0 and 1
Returns a list of random elements
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function returns a random integer in the range [a, b] (including both ends)?
randint
random
sample
choices
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the function randrange return?
A random integer between a and b (inclusive of b)
A random integer between a and b (exclusive of b)
A random element from a list
A list of random numbers
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function allows you to select several unique random elements from a list?
sample
choice
choices
shuffle
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In which function can you specify weights for selecting elements from a list?
choices
choice
sample
randrange
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?