Variables
Loops
Conditionals
Turtle Graphics
Debugging
100

What is a variable used for in Python?

A) Repeating code
B) Storing information
C) Drawing shapes
D) Stopping a program

 Answer: B) Storing information

100

What is the purpose of a loop? 

A) To stop a program
B) To repeat code multiple times
C) To store variables
D) To draw shapes

Answer: B) To repeat code multiple times

100

Which keyword is used to check a condition in Python?

A) if
B) repeat
C) loop
D) check

Answer: A) if

100

What does Python’s turtle module help programs do?

A) Play music
B) Draw graphics on the screen
C) Store variables
D) Run loops

Answer: B) Draw graphics on the screen

100

What is a bug in a program?

A) A computer virus
B) A mistake in the code
C) A type of loop
D) A turtle command

Answer: B) A mistake in the code

200

Which of the following correctly creates a variable called score with the value 10?

A) score == 10
B) score : 10
C) score = 10
D) 10 = score

Answer: C) score = 10

200

 Which Python loop repeats code while a condition is true?

A) if
B) while
C) repeat
D) continue  

Answer: B) while

200

What symbol means equal to in a Python condition?

A) =
B) ==
C) ===
D) :=

Answer: B) ==

200

Which command moves the turtle forward?

A) move()
B) walk()
C) forward()
D) go()

Answer: C) forward()

200

What does it mean to debug a program?

A) Delete it
B) Add graphics
C) Find and fix errors
D) Restart the computer

Answer: C) Find and fix errors

300

What will the variable x contain after this code runs?


x = 5
x = x + 3


A) 3
B) 5
C) 8
D) 15

Answer: C) 8

300

 

What will this loop print?

x = 0
while x < 3:
    print(x)
    x += 1


A) 1 2 3
B) 0 1 2
C) 0 1 2 3
D) 3 3 3

Answer: B) 0 1 2

300

What will this code print?

x = 10
if x > 5:
    print("Big")

A) Big
B) Small
C) 10
D) Nothing

Answer: A) Big

300

What command turns the turtle right?

A) turn()
B) right()
C) rotate()
D) spin()

Answer: B) right()

300

What is wrong with this code?


if x = 5:
    print("Hello")


A) Nothing
B) It should use == instead of =
C) print is wrong
D) x cannot be used

Answer: B) It should use == instead of =

400

Which of the following variable names is valid in Python?

A) 2score
B) player_score
C) player-score
D) score total  

Answer: B) player_score

400

What would happen if a while loop condition never becomes false?

A) The program stops immediately
B) The loop runs forever
C) Python deletes the loop
D) The computer restarts

Answer: B) The loop runs forever

400

Which keyword is used to run code if the first condition is false?

A) then
B) else
C) next
D) continue

Answer: B) else

400

What shape would this code draw?


for i in range(4):
    forward(100)
    right(90)


A) Triangle
B) Square
C) Pentagon
D) Circle

Answer: B) Square

400

 What kind of error happens when Python cannot understand the code structure?

A) Logic error
B) Syntax error
C) Runtime error
D) Turtle error

Answer: B) Syntax error

500

What will be printed by this code?

points = 4
points = points * 2
print(points)


A) 2
B) 4
C) 6
D) 8

Answer: D) 8

500

How many times will this loop run?


x = 1
while x <= 4:
    print("Python")
    x += 1


A) 3
B) 4
C) 5
D) Infinite

Answer: B) 4

500

What will this program print?

score = 85

if score >= 90:
    print("A")
else:
    print("Not A")

A) A
B) B
C) Not A
D) Nothing

Answer: C) Not A

500

How many sides would this code draw?

for i in range(3):
    forward(100)
    right(120)

A) 3
B) 4
C) 5
D) 6

Answer: A) 3

500

What will happen if you run code that uses a variable that was never created?

A) The program runs normally
B) Python ignores it
C) You get an error
D) It becomes zero automatically

Answer: C) You get an error

M
e
n
u