




















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





















45+ (2026⁄2027 Updated) Solved Exams + 100% Verified Solutions │ Complete Q&A
Question 1 ✓^ Correct^ 1 / 1 pts
2.2 Quiz: Karel Commands Question: 1 Which of these is a valid Karel command? move MOVE move() move(1) Question: 2 Which one of these is NOT a command that Karel knows? Turn Left Turn Right Move Forward Put Down a Ball
CORRECT ANSWER
move() Turn Right
This document provides a comprehensive exam preparation pack containing 47 verified questions with complete correct answers. It is curated to reinforce core syllabus principles, sharpen critical thinking , and support effective revision , practice, and self-assessment for exam success.
✓ Verified Solutions ✓ Instant Feedback ✓ Comprehensive Review
2.4: Your First Karel Program
CORRECT ANSWER
if front_is_clear(): move() if balls_present(): take_ball() else: move() if front_is_clear(): move() if balls_present(): take_ball() else: move() if balls_present(): take_ball()
Question 3 ✓^ Correct^ 1 / 1 pts
2.5: Short Stack
CORRECT ANSWER
move() put_ball() put_ball() move()
3.4: Make a Tower
CORRECT ANSWER
move() turn_left() put_ball() move() put_ball() move() put_ball() move() turn_left() turn_left() turn_left()
Question 6 ✓^ Correct^ 1 / 1 pts
3.5: Pyramid of Karel
CORRECT ANSWER
put_ball() move() put_ball() move() turn_left() put_ball() move() put_ball() turn_left() move() put_ball() turn_left() turn_left() move() turn_left() move() put_ball() turn_left() turn_left() turn_left()
4.2 Karel Can't Turn Right Quiz Question: 1 How many times should Karel turn left in order to turn right? 1 2 3 4 Question: 2 What can be used to teach Karel to turn right? Functions Variables Dog treats Karel can already turn right
CORRECT ANSWER
3 Functions
Question 8 ✓^ Correct^ 1 / 1 pts
4.4: Fireman Karel
CORRECT ANSWER
def turn_right(): turn_left() turn_left() turn_left() turn_right() move() move() move() turn_left()
Question 11 ✓^ Correct^ 1 / 1 pts
5.4: Pancakes
CORRECT ANSWER
def make_pancakes(): put_ball() put_ball() put_ball() move() make_pancakes() move() move() make_pancakes() move() move() make_pancakes() move()
Question 12 ✓^ Correct^ 1 / 1 pts
5.5: Backflip
CORRECT ANSWER
def backflip(): turn_left() turn_left() turn_left() turn_left() move() move() move() move() backflip()
5.6: Digging Karel
CORRECT ANSWER
def turn_right(): turn_left() turn_left() turn_left() def turn_around(): turn_left() turn_left() def bury_ball(): turn_right() move() move() move() put_ball() turn_around() move() move() move() turn_right() move() move() bury_ball() move() move() move() bury_ball() move() move() move() bury_ball() move()
6.4: The Two Towers
CORRECT ANSWER
def stack(): put_ball() turn_left() move() put_ball() move() put_ball() turn_twice() move() move() turn_left() def turn_twice(): turn_left() turn_left() def turn_right(): turn_left() turn_left() turn_left() move() stack() move() move() turn_left() put_ball() move() put_ball() move() put_ball() move() turn_right()
Question 16 ✓^ Correct^ 1 / 1 pts
7.2 Commenting Your Code Quiz Question: 1 What is a code comment? A way to teach Karel a new word A way to give notes to the reader to explain what your code is doing A message to your teacher in code A place to write whatever you want in your code
CORRECT ANSWER
A way to give notes to the reader to explain what your code is doing
7.4: The Two Towers + Comments
CORRECT ANSWER
def stack(): put_ball() turn_left() move() put_ball() move() put_ball() turn_twice() move() move() turn_left() def turn_twice(): turn_left() turn_left() def turn_right(): turn_left() turn_left() turn_left() move()
stack() move() move() turn_left()
put_ball() move() put_ball() move() put_ball() move() turn_right()
9.2 Super Karel Quiz Question: 1 What commands does SuperKarel know that regular Karel does not? turn_left() and jump() turn_right() and jump() turn_around() and turn_right() turn_around() and jump()
CORRECT ANSWER
turn_around() and turn_right()
Question 20 ✓ Correct 1 / 1 pts
9.4: The Two Towers + SuperKarel
CORRECT ANSWER
def stack(): put_ball() turn_left() move() put_ball() move() put_ball() turn_around() move() move() turn_left() move()
stack() move() move() turn_left()
put_ball() move() put_ball() move() put_ball() move() turn_right()
10.2 For Loops Quiz Question: 1 What is the best way for Karel to move 10 times? move() move() move() move() move() move() move() move() move() move() for i in range(10): move() move(10) move10()
CORRECT ANSWER
for i in range(10): move()
Question 22 ✓^ Correct^ 1 / 1 pts
10.5: Take 'em All
CORRECT ANSWER
move() for i in range(100): take_ball() move()
Question 23 ✓^ Correct^ 1 / 1 pts
10.6: Dizzy Karel
CORRECT ANSWER
for i in range(32): turn_left()
11.2 If Statements Quiz Question: 1 Why do we use if statements in Python? To break out of some block of code To do something only if a condition is true To do something while a condition is true To repeat something for a fixed number of times Question: 2 Which general if statement definition is written correctly? A for condition: # code B if condition: # code C if i in range(COUNT): #code D if false: # code A B C D
CORRECT ANSWER
To do something only if a condition is true B
Question 27 ✓^ Correct^ 1 / 1 pts
11.5: Is There a Ball?
CORRECT ANSWER
if no_balls_present(): put_ball() move()
12.2 If/Else Statements Quiz Question: 1 What does an if/else statement look like in Python? if condition:
if condition:
else condition:
if condition:
if condition:
if condition:
else:
Question: 2 Why do we use if/else statements in Python? To repeat something for a fixed number of times To do something if a condition is true and do something else if the condition is false To break out of some block of code To repeat something while a condition is true
CORRECT ANSWER
if condition:
else:
To do something if a condition is true and do something else if the condition is false
Question 29 ✓^ Correct^ 1 / 1 pts
12.5: Right Side Up
CORRECT ANSWER
if facing_south(): turn_left() if facing_west(): turn_left() turn_left()
13.6: Big Tower
CORRECT ANSWER
put_ball() if facing_west(): turn_right() if facing_south(): turn_left() turn_left() if facing_east(): turn_left() while front_is_clear(): move() put_ball()
Question 34 ✓^ Correct^ 1 / 1 pts
14.2 Control Structures Example Quiz Question: 1 What do we use control structures for in Python? Control the flow of the program; how the commands execute. Start our Python program Store information for later Teach Karel new commands Question: 2 Which of the below are examples of control structures? (I) if (II) if/else (III) while (IV) for I only I and II only III and I only I, II, III, and IV
CORRECT ANSWER
Control the flow of the program; how the commands execute. I, II, III, and IV
14.4: Random Hurdles
CORRECT ANSWER
def jump_hurdle(): turn_left() move() turn_right() move() turn_right() move() turn_left() for i in range(13): if front_is_clear(): move() else: jump_hurdle()