
Python Programming Quiz
Quiz
•
Information Technology (IT)
•
University
•
Practice Problem
•
Medium
Abhishek Swami
Used 5+ times
FREE Resource
Enhance your content in a minute
40 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code snippet? x = 5 if x > 3: print("A") else: print("B")
B
A
Error
None of the above
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct syntax for an if statement in Python?
if x > y then:
if (x > y)
if x > y:
if x > y {
3.
OPEN ENDED QUESTION
3 mins • 1 pt
x = 10 y = 20 if x > y: print("X is greater") else: print("Y is greater")
Evaluate responses using AI:
OFF
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose the correct code to complete the following program: x = 15 if x % 2 == 0: print("Even") else: __________
print("Odd")
print("Even")
print("None")
print(x)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement is used to exit a loop?
exit
break
continue
stop
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which data structure is commonly used to mimic a switch statement in Python?
List
Dictionary
Tuple
Set
7.
OPEN ENDED QUESTION
3 mins • 1 pt
def switch_demo(x): switcher = { 1: "One", 2: "Two", 3: "Three" } return switcher.get(x, "Invalid") print(switch_demo(2))
Evaluate responses using AI:
OFF
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
42 questions
COMPAP
Quiz
•
University
40 questions
Understanding the System Development Life Cycle (SDLC)
Quiz
•
University
40 questions
Trắc nghiệm củng cố kiến thức lớp 11 HK2
Quiz
•
11th Grade - University
40 questions
Ujian Akhir Semester Informatika
Quiz
•
7th Grade - University
35 questions
PREPAIR ASAS 2024
Quiz
•
9th Grade - University
45 questions
MedLit Copyryt
Quiz
•
12th Grade - University
40 questions
Tema 3. Recepción y distribución de radio y TV terrestre
Quiz
•
2nd Grade - University
40 questions
Infinity Code Nexus
Quiz
•
University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd 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
Discover more resources for Information Technology (IT)
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
7 questions
Different Types of Energy
Interactive video
•
4th Grade - University
20 questions
Slopes and Slope-Intercept Form
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Biomolecules (Updated)
Interactive video
•
11th Grade - University
20 questions
Winter/Holiday Trivia
Quiz
•
KG - University
10 questions
WINTER WIN Time - ELA - 12/9/2025
Quiz
•
KG - University
7 questions
Human Impact on Resources
Interactive video
•
4th Grade - University
