Python For Loops

Flashcard
•
Computers
•
10th Grade
•
Easy
Wayground Content
Used 1+ times
FREE Resource
Student preview

32 questions
Show all answers
1.
FLASHCARD QUESTION
Front
What is the syntax of a for loop in Python?
Back
for item in iterable:
# code to be executed
2.
FLASHCARD QUESTION
Front
How do you use the range() function in a for loop?
Back
Specify the start, stop, and step values within the range() function.
3.
FLASHCARD QUESTION
Front
What is the output of the following code?
for i in range(5):
print(i)
Back
0
1
2
3
4
4.
FLASHCARD QUESTION
Front
What is the output of the following code?
for i in range(1, 6):
print(i)
Back
1
2
3
4
5
5.
FLASHCARD QUESTION
Front
What is the output of the following code?
for i in range(1, 10, 2):
print(i)
Back
1
3
5
7
9
6.
FLASHCARD QUESTION
Front
What is the output of the following code?
for i in range(10, 1, -1):
print(i)
Back
10
9
8
7
6
5
4
3
2
7.
FLASHCARD QUESTION
Front
How do you iterate over a list using a for loop? Options: for i in range(len(my_list)): , for item in range(my_list): , for item in my_list() , for item in my_list:
Back
for item in my_list:
Create a free account and access millions of resources
Similar Resources on Wayground
18 questions
Java Program Parts

Flashcard
•
9th Grade
21 questions
Python Basics Review

Flashcard
•
10th Grade
26 questions
WJEC ICT Voc 1.1 Input and Output

Flashcard
•
10th Grade
26 questions
Boolean Logic, Comparison Operators, and Loops Review Flashcard

Flashcard
•
10th Grade
25 questions
CSB 2nd 9-Weeks Final Exam

Flashcard
•
9th Grade
21 questions
Python Basics

Flashcard
•
9th - 12th Grade
20 questions
Python Basics Review (TSK)

Flashcard
•
9th - 12th Grade
28 questions
Codehs if while for

Flashcard
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

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

Interactive video
•
6th - 10th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade