
Python Day - 3
Quiz
•
Computers
•
8th Grade
•
Practice Problem
•
Medium
KIRAN KUMAR G
Used 2+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of a loop in Python?
To define functions
To repeatedly execute a block of code
To store data values
To print messages
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which type of loop is used to iterate over a sequence in Python?
While loop
If loop
For loop
Repeat loop
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a "for" loop, what does the variable after "for" represent?
The condition
The iteration variable
The sequence to be looped
The loop counter
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following "for" loop:
numbers = [1, 2, 3, 4]
for num in numbers:
print(num * 2)
1 2 3 4
2 4 6 8
1 4 9 16
2 3 4 5
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What statement is used to exit a "for" loop prematurely in Python?
exit
terminate
stop
break
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
"predict the output"
for i in range (1 , 6 , 2):
print(i)
1 2 3
1 3 5
2 4 5
1 3 6
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following "for" loop:
a = [1 , 2 , 3, 5, 7]
for i in a:
if i == 3:
continue
print(i)
0 1 2 3
2 3 4 6
1 2 3 4
1 2 5 7
Create a free account and access millions of resources
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
15 questions
Empowerment Technologies
Quiz
•
KG - 12th Grade
10 questions
BÀI KIỂM TRA GIỮA KÌ 2 - LỚP 3
Quiz
•
1st - 10th Grade
14 questions
Pre-test: On Online searching by Innovative Teaching Ideas)
Quiz
•
6th - 12th Grade
10 questions
ÔN TẬP GIỮA KÌ 1 K8 CTST
Quiz
•
6th - 8th Grade
10 questions
TIN8-HK1-KTTX1
Quiz
•
8th Grade
10 questions
Informatika
Quiz
•
6th - 8th Grade
15 questions
Linux-2 Quiz 2 -- LAMP
Quiz
•
1st - 12th Grade
11 questions
Youtube
Quiz
•
4th Grade - University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
