

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

Show answer
Auto Play
Slide 1 / 31
SLIDE
Similar Resources on Wayground
28 questions
Introduction Database and Database Management System
Presentation
•
8th - 9th Grade
26 questions
Mean, Median, Mode, & Range
Presentation
•
9th Grade
22 questions
Question Words
Presentation
•
9th Grade
24 questions
Java di base
Presentation
•
9th Grade
22 questions
บทที่ 7 การใช้งาน PHP ร่วมกับฟอร์ม
Presentation
•
10th Grade
24 questions
If, If Else & Relational Operators
Presentation
•
9th - 10th Grade
24 questions
Two-Dimensional Lists
Presentation
•
9th - 10th Grade
23 questions
Microsoft Excel
Presentation
•
10th Grade
Popular Resources on Wayground
20 questions
Math Review
Quiz
•
3rd Grade
15 questions
Fast food
Quiz
•
7th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
10 questions
Identify Fractions, Mixed Numbers & Improper Fractions
Quiz
•
3rd - 4th Grade
Discover more resources for Computers
10 questions
Fact Check Ice Breaker: Two truths and a lie
Quiz
•
5th - 12th Grade
10 questions
Video Games
Quiz
•
6th - 12th Grade
10 questions
Logos
Quiz
•
6th - 9th Grade
10 questions
Test Your Knowledge with 15 Fun Trivia Questions
Interactive video
•
6th - 10th Grade
15 questions
Memorial Day Trivia
Quiz
•
KG - 12th Grade
21 questions
Factoring Trinomials (a=1)
Quiz
•
9th Grade
12 questions
Name that Candy
Quiz
•
KG - 12th Grade
20 questions
Guess The App
Quiz
•
KG - Professional Dev...