

For Loops and Range Function
Presentation
•
Computers
•
9th - 10th Grade
•
Medium
Calum Gordon
Used 19+ times
FREE Resource
15 Slides • 16 Questions
1
Count-controlled Loops

2
3
4
Multiple Select
By the end of this lesson you should be able to ....
use the range() function
create for loops over a range of integers
create while loops
define functions
5
6
Multiple Choice
Why do we need to have loops anyway in a computer program?
To avoid needless repetition of lines of code
To make the code much cooler
To show off your coding skills
To put code into the correct order
7
8
Multiple Choice
range() is an example of a ___________ in Python
data structure
key word
function
variable
9
10
Multiple Choice
Which line of code would create the output shown?
print(list(range(12)))
print(list(range(11)))
list(range(12))
range(11)
11
12
Fill in the Blanks
Values that are provided as inputs to a function when it is called?
Type answer...
13
Multiple Choice
Which line of code would produce the output shown?
print(list(range(2,22,2)))
print(list(range(2,20)))
print(list(range(0,22)))
print(list(range(1,21,2)))
14
15
Multiple Choice
What type of loop is a 'for' loop?
Conditional
Count-controlled
Infinite
Nested
16
17
Multiple Choice
Identify the loop variable in this loop?
i
j
k
num
18
19
Fill in the Blanks
Word used to describe the action of using a for loop to repeat an action over every item in a list?
Type answer...
20
21
Multiple Choice
What will the output be from this loop?
All the colours in list printed on the same line
No output
All the colours in list printed out, each on a new line
Every letter in 'colours' printed on a new line
22
23
24
Multiple Choice
How do you think a 'for' loop is represented in a flow chart?
Decision symbol with option to loop back
Decision symbol with no loop back ooption
It is not represented
Multiple decisions one after another
25
26
27
Multiple Select
Two ways to use a for loop?
To iterate over a specific range of integers
To iterate over all the items in a data structure
To iterate as long as a condition is True
To iterate until a condition becomes False
28
Multiple Choice
The range function generates a series of ___________ from start to stop.
integers
numbers
lists
strings
29
Fill in the Blanks
It can include an optional parameter to specify the step size. If this is omitted the default step size is
Type answer...
30
Open Ended
Thinking Hard
What have you learnt today?
What can you do with this knowledge/skill/understanding?
What do you still need to know?
(press Shift+Enter to take a new line ...)
31
Poll
How much of this lesson have you understood?
None of it
Some of it
Most of it
All of it
Count-controlled Loops

Show answer
Auto Play
Slide 1 / 31
SLIDE
Similar Resources on Wayground
25 questions
Merge Sort
Presentation
•
9th - 10th Grade
25 questions
Python - typy danych, zmienne
Presentation
•
9th Grade
24 questions
relations and functions
Presentation
•
8th - 10th Grade
24 questions
IGCSE ICT 6.4 Microprocessors
Presentation
•
10th Grade
24 questions
10-3 Analyzing Functions Graphically
Presentation
•
9th Grade
26 questions
Ethos, Pathos, Logos
Presentation
•
8th - 10th Grade
23 questions
Повторення матеріалу з теми "Програмування мовою Python@
Presentation
•
9th Grade
23 questions
Cold War - Vocabulary
Presentation
•
9th - 10th Grade
Popular Resources on Wayground
10 questions
Safety Day 2026 – Student Review
Quiz
•
9th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
12 questions
Map Skills
Quiz
•
3rd Grade
22 questions
Continents and Oceans
Quiz
•
5th Grade
15 questions
Rounding Decimals
Quiz
•
5th Grade