
Understanding Conditionals in Coding
Authored by Pablo Quintero
Computers
8th Grade
Used 6+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 8 pts
What’s an example of an “If…then” statement?
If you finish your homework, then you can play outside.
I like playing games outside.
Because I finished my homework, I played outside.
Playing outside is fun.
Answer explanation
The correct choice, "If you finish your homework, then you can play outside," is a clear example of an "If…then" statement, indicating a condition and its consequence.
2.
MULTIPLE CHOICE QUESTION
20 sec • 8 pts
What’s an example of an “If…then…else” statement?
If it’s raining, then bring an umbrella, else wear sunglasses.
I will bring an umbrella because it’s raining.
If it’s raining, then bring an umbrella.
I love wearing sunglasses when it’s sunny.
Answer explanation
The correct choice, "If it’s raining, then bring an umbrella, else wear sunglasses," clearly follows the "If…then…else" structure, providing a condition and two possible actions based on that condition.
3.
MULTIPLE CHOICE QUESTION
20 sec • 8 pts
In coding, conditionals tell a computer to do which of the following?
How to do it
To do it faster
When to do it
Where to do it
Answer explanation
Conditionals in coding specify 'when' certain actions should occur based on specific criteria. They do not dictate 'how', 'faster', or 'where' to perform tasks, making 'when to do it' the correct choice.
4.
MULTIPLE CHOICE QUESTION
20 sec • 8 pts
True or false: A conditional statement must have all the following: If, then, else
False
True
Answer explanation
The statement is false because a conditional statement only requires 'if' and 'then'. The 'else' part is optional and not necessary for a conditional to exist.
5.
MULTIPLE CHOICE QUESTION
20 sec • 8 pts
Which of these is a true conditional statement?
If the light is red, then stop.
Stop when the light is red.
Because the light is red, stop.
I stopped at the red light.
Answer explanation
The correct choice, "If the light is red, then stop," is a true conditional statement as it clearly establishes a cause-and-effect relationship. The other options do not present a conditional structure.
6.
MULTIPLE CHOICE QUESTION
20 sec • 8 pts
What does an “else” statement do in a conditional?
It tells what to do if the “if” condition is met.
It tells what to do if the “if” condition is not met.
It repeats the “if” condition.
It restarts the program.
Answer explanation
An 'else' statement specifies the actions to take when the 'if' condition is not met, providing an alternative path in the code. This is why the correct answer is that it tells what to do if the 'if' condition is not met.
7.
MULTIPLE CHOICE QUESTION
20 sec • 8 pts
Which of the following would best describe a conditional?
A list of things to do.
A choice based on a condition.
A result after an action.
A way to repeat an action.
Answer explanation
A conditional refers to a choice made based on whether a specific condition is true or false. This distinguishes it from lists, results, or repetition, making 'A choice based on a condition' the best description.
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
17 questions
Алгоритмы ветвления
Quiz
•
8th Grade
16 questions
Hour_of_Code
Quiz
•
5th - 12th Grade
17 questions
Networks Lesson 2 - Recap and Review
Quiz
•
6th - 8th Grade
18 questions
Publisher Basics
Quiz
•
7th - 10th Grade
20 questions
CS-9 Chapter-2 Types of Computer Part1: Rabin Ghimire
Quiz
•
8th - 9th Grade
14 questions
Adobe Premiere Pro :>>
Quiz
•
8th Grade
20 questions
икт 21-40
Quiz
•
1st Grade - University
11 questions
Python Variables
Quiz
•
6th - 8th Grade
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
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
20 questions
Figurative Language Review
Quiz
•
6th Grade