
Python Quiz-13.06.25
Quiz
•
Professional Development
•
Professional Development
•
Practice Problem
•
Easy
VINUPRIYA M
Used 1+ 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 the if statement in Python?
To define a function
To declare a variable
To execute a block of code conditionally
To create a loop
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the elif statement in Python?
To handle exceptions
To create a loop
To define a function
To check additional conditions after the initial if statement
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code snippet?
x = 10
if x > 5:
print("Greater than 5")
elif x > 8:
print("Greater than 8")
else:
print("Less than or equal to 5")
Greater than 5
Greater than 8
Less than or equal to 5
No output
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code snippet?
for i in range(5):
if i == 3:
continue
print(i)
0 1 2 3 4
0 1 2 4
0 1 2
0 1 2 3
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find the output of the following program:
li = ['Harsh', 'Pratik', 'Bob', 'Dhruv']
print (li[1][-1])
r
b
D
k
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find the output of the following program:
a = ['Learn', 'Quiz', 'Practice', 'Contribute']
b = a
c = a[:]
b[0] = 'Code'
c[1] = 'Mcq'
count = 0
for c in (a, b, c):
if c[0] == 'Code':
count += 1
if c[1] == 'Mcq':
count += 10
print (count)
4
5
11
12
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find the output of the following program:
def gfg(x,li=[]):
for i in range(x):
li.append(i*i)
print(li)
gfg(3,[3,2,1])
[3, 2, 1, 0, 1, 4]
[0, 1, 0, 1, 4]
[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
RGPD quizz
Quiz
•
KG - Professional Dev...
11 questions
Scheduled Waste Management
Quiz
•
Professional Development
15 questions
Szociális hozzájárulási adó 2022
Quiz
•
Professional Development
15 questions
ODI TL
Quiz
•
Professional Development
11 questions
Commercial 2022 Priorities
Quiz
•
Professional Development
7 questions
Введение в программирование - 1 семинар
Quiz
•
Professional Development
12 questions
ILA Module 11 ( புதிதாக பிறந்த குழந்தைகளில் பலவீனமாக உள்ளவர்
Quiz
•
Professional Development
15 questions
Refreshment Ketentuan Asuransi Tahun 2025
Quiz
•
Professional Development
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
