
Q4 LESSON 2: Looping Structures - WHILE and FOR Loops
Presentation
•
Computers
•
7th Grade
•
Hard
Esperanza Sabangan
Used 12+ times
FREE Resource
41 Slides • 20 Questions
1
Q4 LESSON 2-MODULE 2: HANDS ACTIVITY 4.2
Python Activities 8 & 9 - Looping Structures – WHILE Loops and Looping Structures – FOR Loops
2
3
4
Poll
What’s your favorite fast food restaurant?
5
6
There are TWO rules that must hold in playing the game.
“Ready to be riddled?” is a LOGICALBRAIN TEASER PUZZLE GAME. The game will enhance your critical thinking ability.
ALL OF YOU will be the participants and must answer by analyzing the RIDDLE to be shown.
You will be given a duration of 30 seconds to answer.
Let's Get it on Pythons!
7
Open Ended
Five letter word
What five-letter word gets shorter when you add two letters to it?
8
ANSWER: Shorter
9
Open Ended
More is less
The more there is, the less you see. What is it?
10
ANSWER: Fog
11
Open Ended
In the light
I exist only when there is light, but direct light kills me. What am I?
12
ANSWER: A Shadow
13
Open Ended
Face and hands
What has a face and two hands but no arms or legs?
14
ANSWER: A Clock
15
Open Ended
While it dries
What gets wetter while it dries?
16
ANSWER: A Towel
17
Open Ended
Around the world
What travels around the world but stays in the same corner?
18
ANSWER: A Stamp
19
Open Ended
In the planets
You can find it in Mercury, Earth, Mars, Jupiter, and Saturn, but not in Venus or Neptune. What is it?
20
ANSWER: The letter "R"
21
Open Ended
Breaks without fall
What breaks but never falls, and what falls but never breaks?
22
ANSWER: Morning and Night
23
Open Ended
Meeting directions
A woman is a bit confused about where her meeting is. Starting on the fourth floor, she climbs up five stories, down seven stories, up six stories, down three stories, and up four stories again. What floor is she on?
24
ANSWER: The ninth floor
25
Open Ended
The city bus
You’re driving a city bus. At the first stop, five women get on. At the second stop, one woman gets off and two men get on. At the third stop, three children get on. The bus is white and it’s raining outside in March. What color is the bus driver’s hair?
26
ANSWER: Whatever color your hair is. You’re the bus driver.
27
Open Ended
Moving while seated
Who makes moves while sitting down?
28
ANSWER: A chess player.
29
Open Ended
Down and up
I come down, but I never go up. What am I?
30
ANSWER: Rain
31
Open Ended
Make, save, change, raise
People make me, save me, change me, raise me. What am I?
32
ANSWER: Money
33
Open Ended
Always in front
What is always in front of you but can’t be seen?
34
ANSWER: The future
35
Open Ended
Once a minute
What can be seen once in a minute, twice in a moment, and never in a thousand years?
36
ANSWER: The letter “M.”
37
Continuation of Presentation of Learner's Tasks Management System
38
39
Open Ended
How important "Modularizing Code" in programming?
40
Open Ended
How do you write if-else, nested if/else and elif statements in Python and state their importance in programming?
41
42
LOOPING
A looping structure allows a block of code to be repeated one or more times.
43
Why LOOP at all?
The main reason why we need looping in programs is to make complex problems simpler as sometimes we won’t be writing the whole program to go through each query if the functionality is same.
The main advantages of using loops in python is that it saves your time, you don’t have to write the same code every time to perform the same functionality; also loops make your code look clean.
44
Open Ended
What is Loop in Python?
What is the syntax of for loop in Python?
45
WHILE Loop
A while loop in python continues to execute the code as long as the given condition is true, if it becomes false, then the loop stops.
Another reason to use while loop is when we aren’t sure about how many times to iterate.
46
47
WHILE Loop sample program structure
48
Types of WHILE Loop
An Infinite Loop
Be careful while using a while loop. Because if you forget to increment the counter variable in python, or write flawed logic, the condition may never become false.
In such a case, the loop will run infinitely, and the conditions after the loop will starve. To stop execution, press Ctrl+C.
49
Types of WHILE Loop
The else statement for while loop
A while loop may have an else statement after it. When the condition becomes false, the block under the else statement is executed.
However, it doesn’t execute if you break out of the loop or if an exception is raised.
50
Types of WHILE Loop
Single Statement while
Like an if statement, if we have only one statement in while’s body, we can write it all in one line.
You can see that there were two statements in while’s body, but we used semicolons to separate them. Without the second statement, it would form an infinite loop
51
FOR Loop
For loop is a python loop which repeats a group of statements for a given number of times.
It is always a good practice to use the for loop when we know the number of iterations.
52
53
54
Types of FOR Loop
55
Open Ended
How do you write a loop in Python?
How many types of loops are there in Python?
56
LOOP Control Statement
Sometimes, you may want to break out of normal execution in a loop.
For this, we have three keywords in Python- break, continue, and pass.
57
Break Statement
When you put a break statement in the body of a loop, the loop stops executing, and control shifts to the first statement outside it.
You can put it in a for or while loop.
58
Continue Statement
When the program control reaches the continue statement, it skips the statements after ‘continue’.
It then shifts to the next item in the sequence and executes the block of code for it.
You can use it with both for and while loops.
59
Pass Statement
In Python, we use the pass statement to implement stubs.
When we need a particular loop, class, or function in our program, but don’t know what goes in it, we place the pass statement in it.
It is a null statement. The interpreter does not ignore it, but it performs a no-operation (NOP).
60
61
Q4 LESSON 2-MODULE 2: HANDS ACTIVITY 4.2
Python Activities 8 & 9 - Looping Structures – WHILE Loops and Looping Structures – FOR Loops
Show answer
Auto Play
Slide 1 / 61
SLIDE
Similar Resources on Wayground
55 questions
Science TCAP Practice
Presentation
•
8th Grade
56 questions
LEGO My Element!
Presentation
•
6th - 8th Grade
58 questions
Petroski - Physical Science LEAP Review
Presentation
•
8th Grade
58 questions
Mitosis vs Meiosis
Presentation
•
7th Grade
57 questions
HISTORY OF COMPUTER
Presentation
•
7th Grade
59 questions
Greek Mythology
Presentation
•
7th Grade
56 questions
Properties of Minerals Guided Lesson
Presentation
•
6th - 8th Grade
55 questions
Earth Science Review Lesson
Presentation
•
8th Grade
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Assessment 2
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
12 questions
2026 TAP Technology in the Classroom
Presentation
•
Professional Development
15 questions
HCS SCI 05 Summer School Assessment 2 Review
Quiz
•
5th Grade
15 questions
HCS SCI 04 Summer School Review 2
Quiz
•
4th Grade
59 questions
Geometry Unit 3 Review
Quiz
•
9th - 12th Grade
14 questions
FAST ELA READING SMAPLE TEST MATERIALS
Passage
•
3rd Grade