If Statements
Interactive Video
•
Other
•
9th - 12th Grade
•
Practice Problem
•
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
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?
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
Discover more resources for Other
20 questions
El Verbo IR Practice
Quiz
•
9th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Understanding Meiosis
Interactive video
•
6th - 10th Grade
20 questions
Graphing Inequalities on a Number Line
Quiz
•
6th - 9th Grade
15 questions
Making Inferences
Quiz
•
7th - 12th Grade
18 questions
SAT Prep: Ratios, Proportions, & Percents
Quiz
•
9th - 10th Grade
15 questions
Main Idea and Supporting Details.
Quiz
•
4th - 11th Grade
12 questions
Exponential Growth and Decay
Quiz
•
9th Grade