If statements DRILL

Quiz
•
Computers
•
8th Grade
•
Easy
Jonathan Smith
Used 4+ times
FREE Resource
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary purpose of using if statements in Karel's programming?
To make Karel move faster
To allow Karel to make decisions based on conditions
To collect more tennis balls
To create a maze
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If Karel encounters a wall, which of the following code snippets correctly uses an if statement to respond?
`if(frontIsBlocked()) {turnLeft();}`
`if(turnLeft()) {move();}`
`if(move()) {frontIsClear();}`
`if(ballsPresent()) {move();}`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following conditions can be used to check if Karel is facing north?
`if(facingWest()) {move();}`
`if(facingSouth()) {turnRight();}`
`if(facingEast()) {turnLeft();}`
`if(facingNorth()) {move();}`
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if Karel executes a move command when the front is blocked?
Karel will move through the wall
Karel will crash and stop
Karel will pick up a ball
Karel will turn left
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can Karel check if there are no tennis balls present on the current corner?
`if(frontIsBlocked()) {move();}`
`if(ballsPresent()) {turnLeft();}`
`if(noBallsPresent()) {move();}`
`if(turnLeft()) {move();}`
Similar Resources on Wayground
10 questions
Movement Challenge Quiz

Quiz
•
6th - 8th Grade
5 questions
JavaScript and Karel the dog

Quiz
•
6th - 8th Grade
5 questions
If Statements and Conditionals Drill

Quiz
•
6th - 8th Grade
10 questions
FOR LOOPS and Angles with Tracy (PYTHON)

Quiz
•
7th - 8th Grade
10 questions
Collecting Treasure with Laurel: Lesson 3

Quiz
•
6th Grade - University
10 questions
BASIC CODE

Quiz
•
2nd - 9th Grade
8 questions
Vex

Quiz
•
7th - 8th Grade
10 questions
Small Basic (Turtle)

Quiz
•
KG - University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
24 questions
Flinn Lab Safety Quiz

Quiz
•
5th - 8th Grade
15 questions
Wren Pride and School Procedures Worksheet

Quiz
•
8th Grade
10 questions
Essential Lab Safety Practices

Interactive video
•
6th - 10th Grade
10 questions
Converting Repeating Decimals to Fractions

Quiz
•
8th Grade