
Conditional Statements
Presentation
•
Computers
•
5th - 12th Grade
•
Medium
Nicole Kline
Used 49+ times
FREE Resource
5 Slides • 7 Questions
1
Conditional Statements in Programming
2
Conditional Statement
A conditional statement in programming is a code construct that allows a program to execute different blocks of code based on whether a specific condition is true or false, commonly represented using
"if-then" or "if-then-else" structures.
3
Example
4
Example
If-Then-Else Statements
If it is raining, then bring an umbrella,
else keep going.
5
Let's see if you understant conditional statements.
6
Multiple Choice
The "If" Statement is an example of a _________________
Correctional Statement
Competitive Statement
Conditional Statement
Inquisitive Statement
7
Multiple Choice
Which of these can be paired with an "if" statement to represent other outcomes of a scenario?
or
else
but
and
8
Multiple Choice
John is 5. What will John get as a snack?
Read the statements below to answer the question.
IF John > 6 years old, then {John is getting ice cream;}
ELSE {John is getting apple juice and grapes;}
John is getting ice cream
and grapes.
John is getting apple juice and grapes.
John is getting apple juice.
John is getting ice cream.
9
Multiple Choice
It is sunny and warm today. What should we do?
Read the statements below to answer the question.
IF (it is sunny and warm) -> {It is a good day to go on a picnic;}
ELSE IF (it is rainy or windy) -> {It is a good day to stay inside;}
ELSE -> {It is a good day to drink hot chocolate;}
It is a good day to go on a picnic.
It is a good day to stay inside.
It is a good day to drink hot chocolate.
It is a good day to go to the beach.
10
Multiple Choice
If I drank hot chocolate, then what weather occurred?
Read the statements below to answer the question.
IF (it is sunny and warm) -> {It is a good day to go on a picnic;}
ELSE IF (it is rainy or windy) -> {It is a good day to stay inside;}
ELSE -> {It is a good day to drink hot chocolate;}
It was sunny and warm.
It was rainy and cold.
It was cloudy and cold.
It was windy and cold.
11
Multiple Choice
What would happen if Elsa built a snowman?
Read the statements below to answer the question.
IF Elsa built a snowman --> {Anna would go and play;}
ELSE IF Elsa built a castle --> {Anna would try to stay in the castle;}
ELSE --> {Anna and Elsa starts to sing;}
Anna would go play
Anna would try to stay in the castle
Anna and Elsa starts to sing!
Nothing would happen
12
Multiple Choice
What is the outcome if Elsa did not build a snowman or a castle?
Read the statements below to answer the question.
IF Elsa built a snowman --> {Anna would go and play;}
ELSE IF Elsa built a castle --> {Anna would try to stay in the castle;}
ELSE --> {Anna and Elsa starts to sing;}
Anna would go and play
Anna would try to stay in the castle
Anna and Elsa starts to sing!
Nothing would happen
Conditional Statements in Programming
Show answer
Auto Play
Slide 1 / 12
SLIDE
Similar Resources on Wayground
10 questions
Comma Rules: Prepositional phrases at the beginning
Presentation
•
5th - 12th Grade
12 questions
Banking Basics
Presentation
•
6th - 12th Grade
9 questions
Using sources - practice 1
Presentation
•
KG
9 questions
Paul Klee - Level 1 Art
Presentation
•
5th - 12th Grade
9 questions
Juego sobre la energía
Presentation
•
KG
9 questions
Spanish Negatives
Presentation
•
6th - 12th Grade
9 questions
Reading Strategies
Presentation
•
6th - 8th Grade
10 questions
Second conditional
Presentation
•
5th Grade - University
Popular Resources on Wayground
10 questions
GPA Lesson
Presentation
•
9th - 12th Grade
7 questions
Albert Einstein
Quiz
•
3rd Grade
31 questions
Bridge A Review
Quiz
•
3rd Grade
6 questions
Blue Sue and Red Ruth
Quiz
•
3rd Grade
8 questions
(Day12 HW) Inverse Trig Ratios
Quiz
•
9th Grade
20 questions
Summer Geometry QUIZ (Week3)
Quiz
•
9th Grade
16 questions
Theme Practice
Quiz
•
7th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
Discover more resources for Computers
10 questions
GPA Lesson
Presentation
•
9th - 12th Grade
8 questions
(Day12 HW) Inverse Trig Ratios
Quiz
•
9th Grade
20 questions
Summer Geometry QUIZ (Week3)
Quiz
•
9th Grade
16 questions
Theme Practice
Quiz
•
7th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
16 questions
Warm Up: Basics of Geometry
Quiz
•
9th Grade
16 questions
Translations and Reflections
Quiz
•
9th - 10th Grade
54 questions
5th Grade Trivia
Quiz
•
5th Grade