
python-selection-statements
Presentation
•
Computers
•
7th - 12th Grade
•
Hard
M S
Used 13+ times
FREE Resource
15 Slides • 20 Questions
1
Draw
how do you feel today?? circle your choice>>
2
Selection conditional statements
Chapter 4 - section 1
3
Objectives
if - statement
if - else statement
if - elif statement
define and use
selection control structure
define
4
Lets start with a revison
5
Multiple Choice
control structure means
step by step code running
the flow of the code in the program
decision and branching code
controlling the code
6
Multiple Choice
Conditional statements are expressions that result in either a yes or No
true
false
not sure
I dont remember
7
Multiple Choice
8
Multiple Choice
9
Multiple Choice
Relational operators is like:
>
OR
=
AND
10
Multiple Choice
Not a Relational operators :
=
<=
>
==
11
Multiple Choice
Using the variables
Lexus_XR = 4500 and Tesla = 5200 in Python,
this expression :
Lexus_XR >= Tesla
will be
False
True
12
Multiple Choice
equal relational operator
=
!=
==
13
14
in python we use
if Statements
for decision making
selection means using statements (rules) that is used for decision making
15
in python we use
if Statements
for decision making
16
condition is used in our everyday life
For example
Traffic lights are an example of conditional statements. Since the red light means stop and the green light means to move.
17
can you give other examples??
18
The if statement
The if statement is used together with conditional statements
to decide whether to run a code block or skip it.
19
20
Multiple Choice
if statement is used together with ------------ in order to work correctly
control statement
input function
conditional statement
print function
21
Multiple Choice
what will be the output of the shown code?
see you tomorrow
you should stay and attend classes
error
nothing
22
Multiple Choice
what is the output
the weather still hot
its not hot any more
the weather still hot
its not hot any more
temp = 30
23
Multiple Choice
the if statement will ------the block of code ( in line 4 )
execute ( run )
skip ( not run )
24
Multiple Choice
line 4 in this code will be
skipped
executed
error
nothing
25
Multiple Choice
line 4 in this code will be skipped because
time is > 8
the condition of if is false
there is an error in the code
time must = 8
26
how to fix this ? >>>>>>>>
27
28
29
Multiple Choice
so if you are coding one selection or one option
then its better to use ?
if
statement
if - else
statement
if - elif - else
statement
sequencing
30
Multiple Choice
and if you are coding two selections or two options
then its better to use ?
if
statement
if - else
statement
if - elif - else
statement
sequencing
31
Multiple Choice
but if they are more then two selections or options
then its better to use ?
if
statement
if - else
statement
if - elif - else
statement
sequencing
32
Multiple Choice
if no selections or no repeating you will use ---- coding
if
statement
if - else
statement
if - elif - else
statement
sequencing
33
34
35
Open Ended
Exit Ticket
tell me about what you learned today
how do you feel today?? circle your choice>>
Show answer
Auto Play
Slide 1 / 35
DRAW
Similar Resources on Wayground
27 questions
Atmospheric and Oceanic Circulation
Lesson
•
6th Grade - University
25 questions
Interval notation
Lesson
•
7th - 12th Grade
31 questions
Python 2 lesson
Lesson
•
KG
28 questions
11.13 Animation Assignment
Lesson
•
KG
29 questions
Pi Day Fun
Lesson
•
6th - 12th Grade
30 questions
ESB Domain 2 Lesson 2
Lesson
•
8th - 12th Grade
34 questions
For цикл
Lesson
•
KG
29 questions
Musicals and their source materials part 4
Lesson
•
6th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
14 questions
Boundaries & Healthy Relationships
Lesson
•
6th - 8th Grade
13 questions
SMS Cafeteria Expectations Quiz
Quiz
•
6th - 8th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
12 questions
SMS Restroom Expectations Quiz
Quiz
•
6th - 8th Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
10 questions
Pi Day Trivia!
Quiz
•
6th - 9th Grade
Discover more resources for Computers
14 questions
Boundaries & Healthy Relationships
Lesson
•
6th - 8th Grade
13 questions
SMS Cafeteria Expectations Quiz
Quiz
•
6th - 8th Grade
12 questions
SMS Restroom Expectations Quiz
Quiz
•
6th - 8th Grade
10 questions
Pi Day Trivia!
Quiz
•
6th - 9th Grade
15 questions
SMS PBiS Hallway Expectations
Quiz
•
6th - 8th Grade
10 questions
Mind the pi : Pi Day Trivia
Lesson
•
6th - 8th Grade
15 questions
Pi Day Trivia!
Quiz
•
9th Grade
15 questions
Pi Day Trivia
Quiz
•
9th - 12th Grade