
LESSON 6: Text Files and Nesting Looping Structures & List
Presentation
•
Computers
•
7th Grade
•
Practice Problem
•
Easy
Esperanza Sabangan
Used 8+ times
FREE Resource
54 Slides • 14 Questions
1
Q4 LESSON 3:
HANDS-ON ACTIVITY 4.3
Python Activity 10: Files and Nesting Looping Structures
Python Activity 11: Part A – Lists
2
3
Open Ended
If YOU had the "World’s Attention" for 30 seconds, What would YOU say?
4
5
There are TWO rules that must hold in playing the game.
“Ready to be riddled?” is a LOGICAL BRAIN TEASER PUZZLE GAME. This activity 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!
6
Open Ended
What 4-letter word can be written forward, backward or upside down, and can still be read from left to right?
7
ANSWER: NOON
8
Open Ended
Which tire doesn’t move when a car turns right?
9
ANSWER: A spare tire
10
Open Ended
What fastens two people yet touches only one?
11
ANSWER: A wedding ring.
12
Open Ended
How can a man who shaves several times a day still sport a long beard?
13
ANSWER: He’s a barber.
14
Open Ended
What do an island and the letter “t” have in common?
15
ANSWER: They are both in the middle of water.
16
Open Ended
You’re in a dark room with a candle, a wood stove, and a gas lamp. You only have one match, so what do you light first?
17
ANSWER: The MATCH.
18
Open Ended
Which three letters can frighten a thief away?
19
ANSWER: ICU
20
Open Ended
A red house is made from red bricks. A blue house is made from blue bricks. A yellow house is made from yellow bricks. What is a green house made from?
21
ANSWER: GLASS
22
Open Ended
Four cars come to a four-way stop, all coming from a different direction. They can’t decide who got there first, so they all go forward at the same time. They do not crash into each other, but all four cars go. How is this possible?
23
ANSWER: They all made right-hand turns.
24
Open Ended
An elevator is on the ground floor. There are five people in the elevator including me. When the lift reaches the first floor, one person gets out and two people get in. The lift goes up to the second floor, three people get out, five people get in. It then goes up to the next floor up, no-one gets out but 12 people get in. Halfway up to the next floor up the elevator cable snaps, it crashes to the floor. Everyone else dies in the elevator except me. How did I survive?
25
ANSWER: I got off on the first floor.
26
27
Open Ended
Why is iteration/looping important?
28
Multiple Choice
Which of the following best describes the purpose of a for loop?
A for loop is for doing something an indeterminate number of times.
A for loop is doing something an infinite number of times.
A for loop is for doing something a fixed number of times.
A for loop is for doing something three times.
29
Multiple Choice
The condition for a while loop to continue could include which of the following?
While something equals something
While something is greater than something
While something is True
All of these
30
31
32
Nested Loop
A nested loop is a loop inside the body of the outer loop. The inner or outer loop can be any type, such as a while loop or for loop. For example, the outer for loop can contain a while loop and vice versa.
The outer loop can contain more than one inner loop. There is no limitation on the chaining of loops.
In the nested loop, the number of iterations will be equal to the number of iterations in the outer loop multiplied by the iterations in the inner loop.
33
NESTED FOR LOOP - Syntax of using a nested for loop in Python
34
NESTED FOR LOOP - Syntax of using a nested for loop in Python
In this program, the outer for loop is iterate numbers from 1 to 10. The range() return 10 numbers. So total number of iteration of the outer loop is 10.
In the first iteration of the nested loop, the number is 1. In the next, it 2. and so on till 10.
Next, For each iteration of the outer loop, the inner loop will execute ten times. The inner loop will also execute ten times because we are printing multiplication table up to ten.
35
NESTED FOR LOOP - Syntax of using a nested for loop to print pattern
In this program, the outer loop is the number of rows print.
The number of rows is five, so the outer loop will execute five times
Next, the inner loop is the total number of columns in each row.
For each iteration of the outer loop, the columns count gets incremented by 1
In the first iteration of the outer loop, the column count is 1, in the next it 2. and so on.
The inner loop iteration is equal to the count of columns.
36
NESTED FOR LOOP - Syntax of using a nested for loop to print pattern
37
NESTED WHILE LOOP - Syntax of using a nested WHILE loop
38
NESTED WHILE LOOP - Syntax of using a nested WHILE in FOR loop
39
NESTED WHILE LOOP - Syntax of using a nested FOR in WHILE loop
40
BREAK NESTED LOOP SAMPLE
41
CONTINUE NESTED LOOP SAMPLE
42
NESTED LOOP USING LIST SAMPLE
43
NESTED LOOP USING LIST SAMPLE
44
LISTS IN PYTHON
45
PROPERTIES OF A LIST
Mutable: The elements of the list can be modified. We can add or remove items to the list after it has been created.
Ordered: The items in the lists are ordered. Each item has a unique index value. The new items will be added to the end of the list.
Heterogenous: The list can contain different kinds of elements i.e; they can contain elements of string, integer, boolean, or any type.
Duplicates: The list can contain duplicates i.e., lists can have two items with the same values.
46
LISTS SAMPLES IN PYTHON
47
LISTS INDEXING IN PYTHON
48
LISTS (+) INDEXING SAMPLE IN PYTHON
49
LISTS (-) INDEXING SAMPLE IN PYTHON
50
LISTS APPEND SAMPLE IN PYTHON
51
LISTS INSERT SAMPLE IN PYTHON
52
LISTS REMOVE SAMPLE IN PYTHON
53
LISTS REMOVE SAMPLE IN PYTHON
54
LISTS REMOVE SAMPLE IN PYTHON
55
LISTS REMOVE SAMPLE IN PYTHON
56
LISTS REMOVE SAMPLE IN PYTHON
57
LISTS EXTEND SAMPLE IN PYTHON
58
LISTS EXTEND SAMPLE IN PYTHON
59
LISTS MODIFY SAMPLE IN PYTHON
60
LISTS MODIFY ALL ITEM SAMPLES IN PYTHON
61
LISTS CONCATENATION SAMPLES IN PYTHON
62
LISTS DEEP COPYING SAMPLES IN PYTHON
63
LISTS USING COPY() SAMPLES IN PYTHON
64
LISTS SORT() SAMPLES IN PYTHON
65
LISTS REVERSE() SAMPLES IN PYTHON
66
LISTS MAX() & MIN() SAMPLES IN PYTHON
67
68
Q4 LESSON 3:
HANDS-ON ACTIVITY 4.3
Python Activity 10: Files and Nesting Looping Structures
Python Activity 11: Part A – Lists
Show answer
Auto Play
Slide 1 / 68
SLIDE
Similar Resources on Wayground
66 questions
Lab Safety
Presentation
•
6th - 8th Grade
60 questions
Ecosystems & Cycles
Presentation
•
8th Grade
62 questions
AR verb forms
Presentation
•
7th Grade
59 questions
Greek Mythology
Presentation
•
7th Grade
63 questions
Newton's 2nd Law of Motion
Presentation
•
8th Grade
61 questions
Adams & Jefferson Presidential Administrations
Presentation
•
8th Grade
58 questions
Mitosis vs Meiosis
Presentation
•
7th Grade
63 questions
2.5 Evaporation & Distillation
Presentation
•
7th Grade
Popular Resources on Wayground
20 questions
"What is the question asking??" Grades 3-5
Quiz
•
1st - 5th Grade
20 questions
“What is the question asking??” Grades 6-8
Quiz
•
6th - 8th Grade
10 questions
Fire Safety Quiz
Quiz
•
12th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
34 questions
STAAR Review 6th - 8th grade Reading Part 1
Quiz
•
6th - 8th Grade
20 questions
“What is the question asking??” English I-II
Quiz
•
9th - 12th Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
47 questions
8th Grade Reading STAAR Ultimate Review!
Quiz
•
8th Grade
Discover more resources for Computers
20 questions
“What is the question asking??” Grades 6-8
Quiz
•
6th - 8th Grade
34 questions
STAAR Review 6th - 8th grade Reading Part 1
Quiz
•
6th - 8th Grade
20 questions
Revising & Editing practice
Quiz
•
7th Grade
76 questions
STAAR Mixed Review (Print Review)
Quiz
•
3rd - 7th Grade
40 questions
7th Grade ELAR STAAR Review (2025)
Quiz
•
7th Grade
14 questions
Volume of rectangular prisms
Quiz
•
7th Grade
25 questions
7th Grade Writing STAAR Review
Quiz
•
7th Grade
22 questions
Simple Probability
Quiz
•
7th Grade