
Understanding If-Else Statements

Interactive Video
•
Computers
•
5th - 8th Grade
•
Hard

Amelia Wright
FREE Resource
Read more
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of an if-else statement?
To declare a variable.
To define a function.
To execute a block of code based on a condition.
To execute a block of code repeatedly.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used to start an if-else statement?
for
switch
while
if
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the 'else' part of an if-else statement specify?
Code to execute if the condition is false.
Code to execute if the condition is true.
Code to execute before the condition is checked.
Code to execute after the condition is checked.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct way to start an if-else statement?
if (condition) { ... } else if (condition) { ... }
if condition { ... } else { ... }
if (condition) { ... } else { ... }
if (condition) { ... } else if { ... }
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which logical operator is used to check if a condition is not true?
&&
==
||
!
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the 'not' operator do when the operand is true?
Returns true
Returns false
Returns the operand
Throws an error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you write the 'not' operator in code?
^
!
|
&
Create a free account and access millions of resources
Similar Resources on Wayground
11 questions
Understanding If Statements and Relational Operators

Interactive video
•
6th - 8th Grade
6 questions
Roadside bomb kills two in Baghdad, Baqouba bomb kills one

Interactive video
•
6th - 7th Grade
11 questions
Microbit Rock Paper Scissors Concepts

Interactive video
•
5th - 8th Grade
8 questions
CLEAN : Geneva airport left at a standstill amid coronavirus epidemic

Interactive video
•
6th - 7th Grade
7 questions
IfThenElse

Interactive video
•
7th Grade
11 questions
Safety Practices in Woodworking

Interactive video
•
6th - 10th Grade
6 questions
Gatherers' Resource Management Issues

Interactive video
•
9th - 10th Grade
8 questions
Recognizing and Expressing Ideas Contrary to Fact: Understanding If Clauses

Interactive video
•
9th - 10th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
typing

Quiz
•
6th Grade
18 questions
Company Logos

Quiz
•
6th - 8th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
20 questions
Input, Output, Processing or Storage

Quiz
•
5th - 6th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade