If Statements
Interactive Video
•
Other
•
9th - 12th Grade
•
Hard
Catherine Henderson
FREE Resource
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the main purpose of an if statement in a program?
To make decisions based on conditions
To store data in variables
To execute code in a loop
To print text to the console
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What must the condition in an if statement evaluate to?
A list
A Boolean value
A number
A string
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if the condition in an if statement is false?
The program crashes
The code inside the if statement runs
The program restarts
Nothing happens
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of an else statement?
To handle the case when the if condition is false
To start a new program
To repeat the if statement
To end the program
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In an if-else statement, what are the blocks of code called?
Variables
Functions
Loops
Branches
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
11 questions
NEASC Extended Advisory
Lesson
•
9th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
Discover more resources for Other
11 questions
NEASC Extended Advisory
Lesson
•
9th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
17 questions
Afro Latinos: Una Historia Breve Examen
Quiz
•
9th - 12th Grade
13 questions
Halloween Trivia
Quiz
•
9th Grade
17 questions
Hispanic Heritage Month Trivia
Quiz
•
9th - 12th Grade
12 questions
Graphing Inequalities on a Number Line
Quiz
•
9th Grade