How many total times will Karel move in this program?
move()
for i in range(5):
move()
put_ball()
5
What is the final result of the expression 4 + 5 * 3?
19
What will be the output of this program?
number = 5
greater_than_zero = number > 0
if greater_than_zero:
print(number)
5
Which of the following for loops would print the following numbers?
0
1
2
3
4
5
for i in range(6):
print(i)
What is the name of our class game?
Wizard
How can we teach Karel new commands?
Define a new function
What kind of data does a float variable contain?
Numbers that can have decimal components
What will be the output of this program?
number = 5
greater_than_zero = number > 0
if greater_than_zero:
if number > 5:
print(number)
Nothing will print
What is the value of num when this loop completes?
num = 0
for i in range(2, 8, 2):
num = num + i
12
Which classmate was responsible for sound effects in the class game?
Reichen
Say you want to write a program to have Karel put down 300 tennis balls. Which control structure would you use?
For Loop
What does the following code print?
x = 3.4
y = 1
print(int(x))
print(x + y)
3
4.4
What does this program print?
height = 65
gender = "female"
if height < 62 or (height < 69 and gender == "male"): print("You are below average height")
elif height > 69 or (height > 62 and gender == "female"): print("You are above average height") else:
You are above average height
What is the value of sum when this loop completes?
sum = 0
for i in range(3):
sum = sum + 5
for j in range(2):
sum = sum - 1
9
Who does the wizard have to defeat on the top of the castle?
The Kings guard then the king
What is the purpose of using a for loop in code?
To repeat something a fixed number of times
What is the final result of the expression 2**3?
8
number_one = 5
number_two = 10
if number_one == 5:
print(1)
elif number_one > 5:
print(2)
elif number_two < 5:
print(3)
elif number_one < number_two:
print(4)
elif number_one != number_two:
print(5)
else:
print(6)
1
If the user enters a number less than 10, I want the loop to exit. Where should the break command be placed in order to end the loop when the user enters this value?
On line 9
What is level 2 on the Wizard Game
Meadow
The following code contains an error. What line is it on?
1 def turn_right():
2 turn_left()
3 turn_left()
4 turn_Left()
5
6 move()
7 turn_left()
8 move()
9 turn_right()
10 move()
Line 4
On which line of code will Python error?
1. weight = input("How much do you weigh? ")
2. oz_water = weight / 2
3. print("You should drink " + str(oz_water))
4. print("ounces of water every day if you weigh " + weight)
Line 2
What will the following program print when run?
above_16 = True
has_permit = True
passed_test = False
if above_16 and has_permit and passed_test:
print("Issue Driver's License")
elif above_16 or has_permit or passed_test:
print("Almost eligible for Driver's License")
else:
print("No requirements met.")
Almost eligible for Driver’s License
What will be printed to the screen when this program is run?
num = 100
while num > 0:
for i in range(100, 0, -25):
num = num - i
print(num)
-150
Who is Mrs Smiths favorite student
Carlos