
Using Randomness in Python
Authored by Gholamreza Aqajade
Education
1st - 5th Grade
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the "and" operator do in logical operations?
Combines two conditions where both must be true
Negates a condition
Combines two conditions where one must be true
Checks if a value is in a list
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens when both kodie_pos and nixie_pos reach the finish line in the while loop?
The loop continues indefinitely
The loop stops
An error occurs
The turtles move backwards
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you check if kodie_pos is less than finish?
kodie_pos < finish
kodie_pos > finish
kodie_pos == finish
kodie_pos += finish
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following correctly initializes a turtle in Python?
kodie = Turtle()
kodie = generate()
kodie = new Turtle()
kodie = Turtle.create()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function generates a random integer between 1 and 20?
random.range(1, 20)
random.randint(1, 20)
random.random(1, 20)
random.choice(1, 20)
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?