
Section 2.11 - If/Else Statements
Authored by Moyin Yusuf
Information Technology (IT)
11th Grade
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does an if/else statement allow Karel to do?
Only lift a beeper if present
Clean regardless of situation
Perform one action if a condition is true, another if it's false
Count how many beepers are on the ground
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which structure correctly uses if/else?
if (frontIsClear()) { move(); } else { turnLeft(); }
if frontIsClear move(); else turnLeft();
for else if frontIsClear move();
if (frontIsClear()) then move() else turnLeft()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A scenario in Karel where using an if/else statement would be more appropriate than just if is:
When Karel needs to perform one action if a condition is true and a different action if it is false.
When Karel only needs to check a condition and act if it is true, doing nothing otherwise.
When Karel always performs the same action regardless of the condition.
When Karel needs to repeat an action multiple times.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best describes the purpose of an if/else statement in Karel?
To let Karel pick up all beepers in the world.
To allow Karel to choose between two different actions based on a condition.
To make Karel repeat an action until a condition is met.
To make Karel ignore all conditions and always move forward.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will Karel do if the following code is executed and front is not clear?
if (frontIsClear()) { move(); } else { turnLeft(); }
Karel will pick up a beeper.
Karel will do nothing.
Karel will turn left.
Karel will move forward.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When should you use an if/else statement instead of just an if statement in Karel's program?
When you want Karel to do something different if the condition is false.
When Karel should always move forward.
When Karel needs to repeat an action many times.
When Karel only needs to act if a condition is true.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Grade 8:Changing Pitch and Speed in Audacity.
Quiz
•
10th Grade - University
10 questions
Aula 5
Quiz
•
9th - 12th Grade
10 questions
Internet Safety
Quiz
•
8th Grade - University
10 questions
Pemrograman Web dan Perangkat Bergerak
Quiz
•
11th Grade
10 questions
Basic Logic & Programming pt.2
Quiz
•
6th Grade - University
10 questions
Quiz sur les Outils SketchUp
Quiz
•
1st Grade - University
11 questions
Keyboard Shortcuts
Quiz
•
5th Grade - University
10 questions
Exploring Loops in Scratch
Quiz
•
5th Grade - University
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
21 questions
Presidents Day Trivia
Quiz
•
6th - 12th Grade
10 questions
Valentine's Day: History and Modern Celebration
Interactive video
•
9th - 12th Grade
11 questions
Valentine's Day Trivia
Quiz
•
8th - 12th Grade
10 questions
Factor Quadratic Expressions with Various Coefficients
Quiz
•
9th - 12th Grade
10 questions
Evaluating Piecewise Functions Practice
Quiz
•
11th Grade
18 questions
Success Strategies
Quiz
•
9th - 12th Grade