
Conditionals in Python Lesson
Presentation
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Easy
Jason King
Used 4+ times
FREE Resource
14 Slides • 12 Questions
1
2
3
Multiple Choice
Which of the following best describes the purpose of relational operators in programming?
To compare the values of two expressions and return a true/false result.
To perform arithmetic calculations between numbers.
To store large amounts of data in memory.
To display information to the user.
4
5
Multiple Choice
Which relational operator is used to check if two values are not equal in Python?
==
!=
<
>=
6
Match
Match the following
Equal
Not Equal
Less Than
Greater Than
Less than or Equal
==
!=
<
>
<=
==
!=
<
>
<=
7
8
Multiple Choice
What will be the output of the following code? print(10 != 7)
True
False
None
Error
9
10
11
Multiple Select
Which of the following statements about if statements is/are correct?
If statements execute code only when a condition is True.
If statements always execute all code inside them regardless of the condition.
If statements can be used to control the flow of a program.
If statements are only used for mathematical calculations.
12
13
14
Multiple Choice
15
16
Multiple Choice
Which of the following best describes the purpose of an if-else statement in programming?
To repeat a block of code multiple times
To make decisions based on conditions
To store user input
To define a function
17
18
19
Drag and Drop
conditionA:
conditionB:
20
21
Fill in the Blanks
Type answer...
22
23
Multiple Choice
Given the code: if temperature > 25 and is_raining == False: print("It's warm and dry – perfect weather for flying!") What will be printed if temperature is 28 and is_raining is False?
It's warm and dry – perfect weather for flying!
Nothing will be printed.
An error will occur.
It's raining, not perfect weather.
24
25
Multiple Select
Select all correct statements about the use of 'if', 'elif', and 'else' in conditional statements.
'if' is necessary to start a conditional statement.
You can have unlimited 'elif' statements in a block.
'else' is required in every conditional statement.
You can only have one 'if' and one 'else' in a block.
26
Multiple Choice
How do relational operators help in making decisions within conditional statements in programming?
They allow comparison of values to determine program flow.
They store large amounts of data.
They are used to create graphics.
They are only used for mathematical calculations.
Show answer
Auto Play
Slide 1 / 26
SLIDE
Similar Resources on Wayground
20 questions
Adjetivos demostrativos
Presentation
•
9th - 12th Grade
20 questions
2.1 Computer Systems
Presentation
•
9th - 12th Grade
20 questions
Employability Skills
Presentation
•
9th - 12th Grade
21 questions
Unit 3 Vocabulary APCSP
Presentation
•
10th - 12th Grade
20 questions
Properties of Matter Notes
Presentation
•
9th - 12th Grade
20 questions
Volume of Prisms and Cylinders Review Lesson
Presentation
•
9th - 12th Grade
20 questions
Midpoint and distance
Presentation
•
9th - 12th Grade
Popular Resources on Wayground
24 questions
PBIS-HGMS Day 10
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Review 3
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
15 questions
HCS SCI 05 Summer School Assessment 3 Review
Quiz
•
5th Grade
35 questions
Lufkin Road Middle School Student Handbook & Policies Assessment
Quiz
•
7th Grade
18 questions
Geo 11.3 Area of Circles and Sectors
Quiz
•
9th - 11th Grade