Which command will display the text 'Hello world!' on the screen?
A) print(Hello world!)
B) print("Hello world!")
C) print "Hello world!"
D) print = "Hello world!"
The Correct Answer is :
B) print("Hello world!")
What does a for loop do?
A) Runs code one time only
B) Repeats code multiple times
C) Draws a picture
D) Stops the program
The correct answer is:
B) Repeats code multiple times
What does turtle.forward(100) do?
A) Moves the turtle backward
B) Moves the turtle forward 100 steps
C) Turns the turtle right
D) Draws a circle
The correct answer is:
B) Moves the turtle forward 100 steps
Find the error: prit("Hello")
A) Missing parentheses
B) Wrong spelling of print
C) No quotes
D) Too many letters
The correct answer is:
B) Wrong spelling of print
What is a “program”?
A) A video game
B) A list of steps a computer follows
C) A computer
D) A robot
The correct answer is:
B) A list of steps a computer follows
Which of these is a variable?
A) name = "Sam"
B) print("Sam")
C) Hello()
D) Input()
The correct answer is:
A) name = "Sam"
Which for-loop counts from 1 to 5?
A) for i in range(10):
B) for i in range(1,6):
C) for i in range(5):
D) for i in range(0,1):
The correct answer is :
B) for i in range(1,6):
Which command changes the turtle’s drawing color?
A) turtle.shape()
B) turtle.speed()
C) turtle.color("blue")
D) turtle.penup()
The correct answer is :
C) turtle.color("blue")
What's wrong? turtle.forward()
A) No number given
B) Missing parentheses
C) Wrong color
D) Too slow
The correct answer is:
A) No number given
What does an input function do?
A) Allows the Computer to talk
B) Allows the user to enter data using the keyboard
C) Allows the Screen to turn on
D) Allows the Mouse to click by itself
The correct answer is:
B) Allows the user to enter data using the keyboard
Which symbol do we use to make a string?
A) Parentheses ()
B) Quotes "/' (double quotes/single quotes)
C) Brackets []
D) Hashtags #
The correct answer is :
B) Quotes "/' (double quotes/single quotes)
If x = 25, which if-statement will be executed?
A) if x < 20:
B) if x != 20:
C) if x == 20:
D) if x > 20:
The correct answer is:
D) if x > 20:
What does turtle.right(90) mean?
A) Turn left 90°
B) Turn right 180°
C) Turn right 90°
D) Do nothing
The correct answer is:
C) Turn right 90°
Find the mistake:
for i in range(5)
print(i)
A) Too many spaces
B) Missing colon
C) Wrong loop
D) print is incorrect
The correct answer is:
B) Missing colon
What is an algorithm?
A) Dance move
B) Instructions to solve a problem
C) Bug
D) Loop
The correct answer is:
B) Instructions to solve a problem
Which command will correctly ask the user for their age?
A) age = input(How old are you?)
B) input("How old are you?") = age
C) How old are you = input()
D) age = input("How old are you?")
The correct answer is:
D) age = input("How old are you?")
What list does range(3) create?
A) [1]
B) [1,2]
C) [0,1,2]
D) [0,1,2,3]
The correct answer is:
C) [0,1,2]
Which command makes the turtle pick up the pen (stop drawing)?
A) turtle.penup()
B) turtle.pendown()
C) turtle.clear()
D) turtle.home()
The correct answer is:
A) turtle.penup()
Debug this: turtle.colour("red")
A) Missing parentheses
B) Wrong color
C) Should be turtle.color("red")
D) Line does nothing
The correct answer is:
C) Should be turtle.color("red")
When a program starts running, which instruction is executed first?
A) The last instruction
B) A random line
C) The very first line
D) The middle line
The correct answer is:
C) The very first line
What do we use to join words or add numbers together?
A) The + operator.
B) The - operator.
C) The = operator.
D) The * operator.
The correct answer is:
A) The + operator.
What does this code print?
for i in range(4):
print("Hello")
A) Hello (1 time)
B) Hello (2 times)
C) Hello (3 times)
D) Hello (4 times)
The correct answer is:
D) Hello (4 times)
What happens when you run this code?
turtle.color("red")
for i in range(4):
turtle.forward(100)
turtle.left(90)
A) A red triangle
B) A red line
C) A red square
D) A red circle
The correct answer is:
C) A red square
Spot the error:
if age = 10:
print("You are 10!")
A) Wrong word
B) Missing quotes
C) Should use == instead of =
D) Print is spelled wrong
The correct answer is:
C) Should use == instead of =
What is debugging?
A) Fixing mistakes in code
B) Cleaning the computer
C) Resetting a phone
D) Deleting apps
The correct answer is:
A) Fixing mistakes in code