
Python Conditionals
Presentation
•
Computers
•
7th - 12th Grade
•
Practice Problem
•
Medium
Jason Davis
Used 70+ times
FREE Resource
8 Slides • 8 Questions
1
by Jason Davis
2
Essential Question
How can a program make decisions about whether or not to run code?
Objective
I can write code that decides whether or not to perform an action
3
Define: conditional
Code structure
Lets us make decisions
Do a section of code or skip it
"If yes, then do something"
Example: "If it is raining, then I'll bring an umbrella."
4
Multiple Choice
What best describes a conditional?
I will do what I want
If the answer is no, then I'll do something
If it doesn't snow I'll wear my snow boots to school
If the answer is yes, then I'll do something
5
Define: if-clause/then-block
if-clause in code is the condition:
if-clause decides whether or not to proceed with the then-block
then-block has at least one line of code
then-block can either be executed or skipped depending on the if-clause
6
Multiple Choice
Which part of a conditional decides whether or not to skip the then-block?
if-clause
then-block
input statement
print statement
7
Structure of a Conditional
Two parts: if-clause and then-block
then-block is indented under if-clause
Words go in quote marks, numbers don't
Don't forget the colon!
8
Multiple Choice
What happens to the then-block if the condition in the if statement isn't true?
It runs either way
It gets skipped
You will receive an error message
The program asks the user the input a new answer
9
Multiple Choice
What happens to the then-block you forget the colon after the if-clause
It runs either way
It gets skipped
You will receive an error message
The program asks the user the input a new answer
10
Define: comparison operators
Comparison Operators are the symbols that help determine if a conditional is true or false. You might recognize them from your math class - but with a twist!
< less than
<= less than or equal to
> greater than
>= greater than or equal to
== equal to
!= not equal to
11
Fill in the Blanks
What is the comparison operator symbol for greater than?
Type answer...
12
Fill in the Blanks
What is the comparison operator symbol for equal to?
Type answer...
13
What is a valid condition?
Part of the if-clause
Asks a yes or no question
Usually contains an expression (a comparison of value)
Often uses comparison operators
14
Multiple Choice
True or false: The if-clause HAS to use numbers for comparison.
True
False
15
​
16
Poll
On a scale of 1-5, where are you on conditionals?
1
Conditionals? Never heard of them.
2
I am strugling to understand the vocabulary and the coding.
3
I understand the vocabulary, but I'm struggling with the coding.
4
I am good with the coding, but still fuzzy on the vocab
5
I understand everything and I can code programs with conditionals by myself.
by Jason Davis
Show answer
Auto Play
Slide 1 / 16
SLIDE
Similar Resources on Wayground
12 questions
Description in Writing
Presentation
•
8th - 12th Grade
12 questions
Cos'è LINUX ?
Presentation
•
6th - 12th Grade
13 questions
The Electoral College
Presentation
•
6th - 12th Grade
13 questions
Persuasive Appeals
Presentation
•
7th - 11th Grade
12 questions
Anne Frank Character Change
Presentation
•
6th - 9th Grade
13 questions
Independent vs Dependent Variables
Presentation
•
7th - 12th Grade
11 questions
Reading News Online
Presentation
•
5th Grade
11 questions
Identify Essential Study Skills
Presentation
•
6th - 12th Grade
Popular Resources on Wayground
10 questions
Safety Day 2026 – Student Review
Quiz
•
9th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
12 questions
Map Skills
Quiz
•
3rd Grade
22 questions
Continents and Oceans
Quiz
•
5th Grade
15 questions
Rounding Decimals
Quiz
•
5th Grade
Discover more resources for Computers
32 questions
Unit 3: Intro to App Design (APCSP 22-23, Code.org)
Quiz
•
9th - 12th Grade
30 questions
[AP CSP] Spreadsheets Review
Quiz
•
9th Grade
10 questions
Digital Citizenship: Part 1
Quiz
•
6th - 8th Grade
15 questions
AP CSP - Code.org Unit 3 Review
Quiz
•
9th - 12th Grade
40 questions
Introduction to Microsoft Word
Quiz
•
8th - 12th Grade