wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Snakegame_quiz

Total questions: 8

Worksheet time: 4mins

Name
Class
Date
1.

What data structure is used to store the snake’s body segments?

a)

Tuple

b)

Dictionary

c)

List

d)

Set

2.

Which line prevents the snake from moving in the opposite direction instantly?

a)

if head.direction != "down"

b)

time.sleep(0.1)

c)

head.goto(0,0)

d)

screen.listen()

3.

When does the game reset the snake to the center?

a)

When wall collision occurs

b)

When arrow key is pressed

c)

When food is eaten

d)

When arrow key is pressed

4.

Which condition checks for wall collision?

a)

head.xcor() > 290

b)

len(segments) == 0

c)

score == 0

d)

head.distance(food) < 20

5.

What is the purpose of time.sleep(0.1) in the game loop?

a)

To slow down the snake movement

b)

To delay sound

c)

To reset the score

d)

To stop the game

6.

Which module provides the sleep() function?

a)

time

b)

random

c)

turtle

d)

winsound

7.

On which operating system does winsound work?

a)

windows

b)

Linux

c)

unix

d)

Mac

8.

What does winsound.Beep(1000, 150) mean?

a)

Frequency 1000 Hz for 150 ms

b)

. Pitch 150 Hz for 1000 ms

c)

Random sound

d)

Volume 1000 for 150 seconds