Python - For Loop & Nested Loops

Quiz
•
Computers
•
7th Grade
•
Hard
Nur Hashimi
Used 2+ times
FREE Resource
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to start a for loop in Python?
loop
for
repeat
while
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will for i in range(3): print(i) output?
1 2 3
0 1 2
0 1 2 3
1 2
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In for x in range(5):, how many times will the loop run?
4
5
6
Infinite
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function generates a sequence of numbers for a loop?
list()
numbers()
range()
seq()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a nested loop?
A loop that runs only once
A loop inside another loop
A loop without a range
A loop with a break
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a nested loop, which loop runs faster?
The outer loop
The inner loop
Both run at same speed
None
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement is TRUE about for loops?
They can only loop over numbers
They can loop over strings, lists, or ranges
They run forever
They must have 3 parameters
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Python

Quiz
•
6th - 8th Grade
15 questions
Pseudocode and Flowcharts - Computer Science

Quiz
•
KG - 12th Grade
7 questions
Arduino code V5 - test 1

Quiz
•
6th - 8th Grade
10 questions
Programming - Iteration, Basic Programming Constructs & Loop

Quiz
•
2nd - 12th Grade
15 questions
Python Basics

Quiz
•
KG - University
15 questions
Python basics

Quiz
•
6th - 8th Grade
16 questions
Python Basics

Quiz
•
KG - University
13 questions
Python

Quiz
•
7th - 8th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
15 questions
Acceptable Use Policy (Quiz)

Quiz
•
6th - 8th Grade
25 questions
Career Vs. Job

Quiz
•
6th - 8th Grade
20 questions
Copyright and Fair Use

Quiz
•
6th - 8th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
21 questions
Input Output Storage Device

Quiz
•
5th - 8th Grade