
Python for loop
Authored by Sherif Abdelhamid
Computers
University
Used 59+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
An infinite loop is :A loop runs infinite times when the condition-------------.
never fails
run one time
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
In programming, what is iteration/looping?
The repetition of steps within a program
The order in which instructions are carried out
A decision point in a program
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
numbers = [5, 14, 9, 17]
for number in numbers:
if number % 3 == 0:
print(number)
The output will be?
17
9
14
9
17
14
17
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
numbers = [5, 14 ,9, 17]
for number in numbers:
if number >= 9:
print (number)
The output will be?
17
9
14
9
17
14
17
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How many times does the following program print the word ‘computer’:
word= "computer"
for num in range(1,6):
print(word)
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following for loops would print the following numbers?
3
5
7
9
for i in range(3, 10, 2):
print(i)
for i in range(3, 9, 2):
print(i)
for i in range(9):
print(i)
for i in range(3,9):
print(i)
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Three of the for loops below will provide identical values for i. Which for loop will provide values that do not match the others?
for i in range(0, 5):
for i in range(5):
for i in range(0, 5, 1):
for i in range(5, 0, 1):
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Unguided transmission media
Quiz
•
University
10 questions
Understanding Email, Contacts and Calendaring
Quiz
•
University
12 questions
Python Quiz 1.4
Quiz
•
University
10 questions
Tree and Planar Graph
Quiz
•
University
10 questions
CodeMonkey for B.Ed IT
Quiz
•
University
10 questions
Android
Quiz
•
University
10 questions
TOOLS FOR AD & TECHNOLOGY DEVELOPMENT (W4-W6)
Quiz
•
University
10 questions
Bài 25 tin 10
Quiz
•
9th Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade