Basic Programming Checkpoint - For loop
star
star
star
star
star
Last updated about 3 years ago
10 questions
Read carefully through the questions and answer them
1
How many tiles will the character move using the following code? Assume that forward() moves the character forward one tile.
for i in range(1, 5): forward()
How many tiles will the character move using the following code? Assume that forward() moves the character forward one tile.
for i in range(1, 5):
forward()
1
Which line of code will execute the forward() command?
Which line of code will execute the forward() command?
1
Which of the following pieces of code will make the character fire() 10 times?
Which of the following pieces of code will make the character fire() 10 times?
1
Which of the following pieces of code will make the character fire() 10 times?
Which of the following pieces of code will make the character fire() 10 times?
1
Which of the following is equivalent to the code be?
Which of the following is equivalent to the code be?

1
Blank 1 is:
Blank 1 is:
1
Blank 2 is:
Blank 2 is:
1
Blank 3 is:
Blank 3 is:
1
Use loops to write the code that prints leftrightleftrightleftrightup
Use loops to write the code that prints
left
right
left
right
left
right
up

1
Explain the code assuming that the first time the user enters June, then July then August. What will be printed in each of the cases?
Explain the code assuming that the first time the user enters June, then July then August. What will be printed in each of the cases?