
Introduction To Python - For Loop
Presentation
•
Computers
•
8th Grade
•
Medium
Ayomikun J Sodipe
Used 5+ times
FREE Resource
40 Slides • 30 Questions
1
2
Read Questions & carefully
QUESTIONS AHEAD
3
Match
Match these following words to their meanings
Algorithm
Programming
Python
Sequencing
A step-by-step set of instructions
The process of writing code
A text based programming language
The order in which tasks are performed
A step-by-step set of instructions
The process of writing code
A text based programming language
The order in which tasks are performed
4
Multiple Choice
What is variable?
A variable is a named storage location that can hold data & values.
5
Multiple Choice
To repeat until a particular condition is true use:
While loop
For loop
If loop
Indentation
6
Multiple Choice
Python is an example of a:
Text-based programming language
Visual-based programming language
Block-based programming language
Language written in JavaScript
7
8
9
10
11
12
Read Questions & carefully
QUESTIONS AHEAD
13
Match
Match the following Keywords to their meanings
Iteration
Sequence
Syntax
Strings
Variable
Repeating a block of code
Ordered collection of items
Set of rules for writing code
Text (word) data type (within quotes)
Named storage location to store value
Repeating a block of code
Ordered collection of items
Set of rules for writing code
Text (word) data type (within quotes)
Named storage location to store value
14
Multiple Choice
What is a For Loop?
A for loop repeats a block of code a specified number of times.
15
Multiple Choice
True or False.
Lists, Tuples, & Strings are all examples of sequences?
16
Match
Match these Symbols to their appropriate Data type & Data Structure, in python
( )
{ }
[ ]
" "
Tuple
Dictionary
List
String
Tuple
Dictionary
List
String
17
18
19
20
21
Read Questions & carefully
QUESTIONS AHEAD
22
Multiple Choice
What will be the output of the following code?
Python
P
Y
T
H
O
N
PYTHON
p
y
t
h
o
n
23
Multiple Choice
What will be the output of the following code?
h
e
l
l
o
HELLO
hello
An error occurs.
24
25
26
27
Read Questions & carefully
QUESTIONS AHEAD
28
Multiple Choice
What will be the output of the following code?
Nigeria
Canada
Japan
Brazil
Japan
Australia
Nigeria
Japan
"Nigeria
Canada
Japan"
29
Multiple Choice
What will be the output of the following code?
Math
Science
History
Literature
Art
History
Science
Math
30
31
32
33
Read Questions & carefully
QUESTIONS AHEAD
34
Multiple Choice
What would this code output?
35
Multiple Choice
What will be the output of the following code?
2 6 8 10 12
2
4
6
8
10
12
10
8
6
4
2
2
4
6
8
10
12
36
Answer Explanation...
This for loop iterates
using the range (start, stop, step) function,
where: start = 2 → The loop starts at 2.
stop = 12 →The loop stops before reaching 12 (exclusive).step = 2 →
The loop increments i by 2 in each iteration.
37
Multiple Choice
What will be the output of the following code?
10
8
6
4
No output.
4
6
8
10
10
8
6
38
Multiple Choice
What will be the output of the following code?
39
Multiple Choice
What will be the output of the following code?
i
i
i
3
3
3
40
41
42
Multiple Choice
What will be the output of the following code?
0 1 2 3
0 1 2
1 2 3 4
43
Multiple Choice
What will be the output of the following code?
h e l
h
h e l l o
h e
44
Multiple Choice
What will be the output of the following code?
(0,0) (0,1) (1,0) (1,1) (2,0) (2,1)
(0,0) (1,0) (2,0)
(0,0) (1,0)
(0,1) (1,1) (2,1)
45
46
47
48
49
50
Read Questions & carefully
QUESTIONS AHEAD
51
Multiple Choice
What is a Dictionary dict () in Python Programming? is a data structure that stores key-value pairs, which allows data to be stored and retrieved
A collection of values stored in order, accessible by position
A collection of unique values stored without order
A fixed sequence of characters used for text processing
A data structure that stores key-value pairs, allowing data to stored and found easily
52
Multiple Choice
True or False.
Is Dictionary an examples of sequences?
53
54
55
56
57
Read Questions & carefully
QUESTIONS AHEAD
58
Multiple Choice
What will be the output of the following code?
John
25
John: name
25: age
name
age
{'name': 'John', 'age': 25}
59
Multiple Choice
What will be the output of the following code?
60
Multiple Choice
What will be the output of the following code?
61
62
63
64
Read Questions & carefully
QUESTIONS AHEAD
65
Multiple Choice
What will be the output of the following code?
Math
Science
English
Math
Science
English
90
85
88
Grade in Math : 90
Grade in Science : 85
Grade in English : 88
66
Multiple Choice
What will be the output of the following code?
Number of vowels: 4
Number of vowels: 3
Number of vowels: 5
Number of vowels: 6
67
Multiple Choice
What will be the output of the following code?
Alice
16
Grade not found
An error occurs
68
Multiple Choice
What does the term Iteration mean in Python Programming?
69
Match
Match the following Keywords in Python programming to their meanings
While Loop
Print Function
For Loop
Range
Input function
Used to execute a block of code repeatedly as long as a condition is true
Outputs data to the console or other standard output device
Used to iterate over a sequence (like a list or a string)
Generates a sequence of numbers
Allows user input from the console
Used to execute a block of code repeatedly as long as a condition is true
Outputs data to the console or other standard output device
Used to iterate over a sequence (like a list or a string)
Generates a sequence of numbers
Allows user input from the console
70
Show answer
Auto Play
Slide 1 / 70
SLIDE
Similar Resources on Wayground
61 questions
Adams & Jefferson Presidential Administrations
Presentation
•
8th Grade
65 questions
Lesson 1: Physical Fitness Components
Presentation
•
8th Grade
63 questions
SCT3 chap11_révision pré-examen chap11_2223
Presentation
•
9th Grade
60 questions
Ecosystems & Cycles
Presentation
•
8th Grade
68 questions
Unit 7- Earth's Atmosphere & Oceans
Presentation
•
8th Grade
62 questions
GEOGRAPHY OF RUSSIA 1 PHYSICAL
Presentation
•
9th Grade
66 questions
Continental Drift
Presentation
•
8th Grade
63 questions
Newton's 2nd Law of Motion
Presentation
•
8th Grade
Popular Resources on Wayground
10 questions
HCS SCI 03 Summer School Assessment 1
Quiz
•
3rd Grade
15 questions
HCS SCI 05 Summer School Assessment 1 Review
Quiz
•
5th Grade
22 questions
Day 9 Equations and Inequalities Review
Quiz
•
9th Grade
10 questions
Writing and Identifying Ratios Practice
Quiz
•
5th - 6th Grade
7 questions
PYRAMID PERSPECTIVES part 1
Presentation
•
9th - 12th Grade
12 questions
Understanding the Fourth of July
Quiz
•
9th Grade
15 questions
Soccer World Cup Quiz Questions
Quiz
•
7th Grade