Python Flashcard 13 ( Random and Turtle Module)

Python Flashcard 13 ( Random and Turtle Module)

Assessment

Flashcard

Other

6th - 8th Grade

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

8 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What does the random.randint(a, b) function do in Python?

Back

Generate a random integer between a (inclusive) and b (inclusive).

2.

FLASHCARD QUESTION

Front

Which function is used to move the turtle forward by a specified number of units in the turtle module?
a. turtle.move()
b. turtle.forward()
c. turtle.go()
d. turtle.draw()

Back

turtle.forward()

3.

FLASHCARD QUESTION

Front

Which function is used to shuffle the elements of a list randomly using the random module?
a. random.shuffle()
b. random.choice()
c. random.sample()
d. random.randrange()

Back

random.shuffle()

4.

FLASHCARD QUESTION

Front

What is the purpose of the random.seed() function in the random module?

Back

It resets the random number generator to a specific seed value.

5.

FLASHCARD QUESTION

Front

What is the primary purpose of the turtle module in Python?
Options:
a. Drawing graphics and creating visual designs.
b. Generating random numbers.
c. Working with databases.
d. Web scraping.

Back

Drawing graphics and creating visual designs.

6.

FLASHCARD QUESTION

Front

What does the turtle.pendown() function do?

Back

Lowers the turtle's pen to draw on the screen.

7.

FLASHCARD QUESTION

Front

Which function is used to close the turtle graphics window when you are done with drawing?
Options:
a. turtle.close()
b. turtle.exit()
c. turtle.done()
d. turtle.end()

Back

turtle.done()

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?