
Exploring Selection Statements in Python
Presentation
•
Computers
•
9th - 12th Grade
•
Easy
N Ellis
Used 22+ times
FREE Resource
10 Slides • 13 Questions
1
Exploring Selection Statements in Python
An exploration of selection statements in Python, including if statements. Learn how to make decisions in your code based on conditions and control the flow of your program.
2
What exactly does this program do?
3
Multiple Choice
Print statement
Outputs a message on the screen
Gets data from the user
A decision
A loop controlled by a decision
4
Multiple Choice
Input statement
Outputs a message on the screen
Gets data from the user
A decision
A loop controlled by a decision
5
Multiple Choice
6
Selection Statements in Python
Selection statements allow us to control the flow of our program based on certain conditions.
Python provides two types of selection statements: if and if-else.
With if statements, we can execute a block of code only if a certain condition is true.
If-else statements allow us to execute different blocks of code based on different conditions.
Selection statements are essential for making decisions and creating dynamic programs.
7
Multiple Choice
What are the two types of selection statements in Python?
if and if-else
for and while
try and except
def and return
8
Multiple Choice
print("Hello world!")
9
if Statement in Python
Trivia: The if statement in Python is used to execute a block of code only if a certain condition is true. It is also used to handle multiple conditions using if, elif, and else. Additionally, it can be used to check for equality using == and inequality using !=. Conditions can also be combined using and and or.
10
Using the else Statement
11
Multiple Choice
What is the purpose of the else statement in Python?
To execute a block of code when the condition is True
To provide an alternative path of execution when the condition is not met
To check multiple conditions at once
To terminate the program
12
Comparison Operators in Python
13
Multiple Choice
What is the symbol for 'less than or equal to' in Python?
==
!=
<=
>
14
Multiple Choice
What does this symbol represent?
>
Less than
Greater than
Equal to
Less than or equal to
15
Indentation in Python
Python requires indentation as part of the syntax
Indentation signifies the start and end of a block of code
Correct indentation is crucial, or the program may either not run, or give an incorrect result
16
Multiple Choice
What is crucial for selection statements in Python?
Indentation
Semicolons
Brackets
Quotation marks
17
If gives you two options
ELIF stands for Else, If and gives you more options
You can use it as many times as you like
The ELIF statement
18
Write a simple program that might be used inside a police speed camera:
The requirements are:
It must accept the driver’s speed
IF the speed is over 70mph, a message “Issue Fine” should appear on the speed gun
Otherwise it should display
“No Action”
Write a program
19
Add an ELIF statement to the Speeding program
Issue a warning between 70 and 75mph
Only issue a fine for 75mph and over
Using the ELIF statement
20
Reorder
Reorder the following
age = int(input("please enter your age "))
if age >= 14
print("welcome to the Club")
else
print("Sorry, you're not old enough to join yet")
21
Multiple Choice
22
Multiple Choice
What is the name of the variable in this program?
colour
input
" "
23
Multiple Choice
Which is NOT a data type in Python?
integer
boolean
anchor
float
Exploring Selection Statements in Python
An exploration of selection statements in Python, including if statements. Learn how to make decisions in your code based on conditions and control the flow of your program.
Show answer
Auto Play
Slide 1 / 23
SLIDE
Similar Resources on Wayground
19 questions
1. PENGETAHUAN INFORMATIKA
Presentation
•
9th - 12th Grade
17 questions
Study Skills 1
Presentation
•
9th - 11th Grade
18 questions
Quantitative vs Qualitative observations
Presentation
•
9th - 12th Grade
18 questions
Solving Polynomials
Presentation
•
9th - 12th Grade
18 questions
Radical and Rational Notation
Presentation
•
9th - 12th Grade
18 questions
Scatterplots
Presentation
•
9th - 12th Grade
17 questions
Social Media
Presentation
•
9th - 12th Grade
18 questions
Drama Intro
Presentation
•
9th - 12th Grade
Popular Resources on Wayground
16 questions
Grade 3 Simulation Assessment 2
Quiz
•
3rd Grade
19 questions
HCS Grade 5 Simulation Assessment_1 2526sy
Quiz
•
5th Grade
10 questions
Cinco de Mayo Trivia Questions
Interactive video
•
3rd - 5th Grade
17 questions
HCS Grade 4 Simulation Assessment_2 2526sy
Quiz
•
4th Grade
24 questions
HCS Grade 5 Simulation Assessment_2 2526sy
Quiz
•
5th Grade
13 questions
Cinco de mayo
Interactive video
•
6th - 8th Grade
20 questions
Math Review
Quiz
•
3rd Grade
30 questions
GVMS House Trivia 2026
Quiz
•
6th - 8th Grade