
Python Programming Quiz

Quiz
•
Information Technology (IT)
•
University
•
Medium
Abhishek Swami
Used 5+ times
FREE Resource
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
Similar Resources on Wayground
40 questions
Java MCQ Quiz

Quiz
•
University
45 questions
Chapter 9 - Chapter 10 Revision Question Python

Quiz
•
University
40 questions
Ulangan Harian

Quiz
•
11th Grade - University
35 questions
File Handling in Python

Quiz
•
University
40 questions
QUIZ SA 314

Quiz
•
University
43 questions
35-77

Quiz
•
University
40 questions
Дастурлаш 1

Quiz
•
University
40 questions
CSS 3rd Quarter Examination

Quiz
•
11th Grade - University
Popular Resources on Wayground
10 questions
SR&R 2025-2026 Practice Quiz

Quiz
•
6th - 8th Grade
30 questions
Review of Grade Level Rules WJH

Quiz
•
6th - 8th Grade
6 questions
PRIDE in the Hallways and Bathrooms

Lesson
•
12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
15 questions
Subtracting Integers

Quiz
•
7th Grade
Discover more resources for Information Technology (IT)
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
2 questions
Pronouncing Names Correctly

Quiz
•
University
34 questions
WH - Unit 2 Exam Review -B

Quiz
•
10th Grade - University
21 questions
Mapa países hispanohablantes

Quiz
•
1st Grade - University
10 questions
Transition Words

Quiz
•
University
5 questions
Theme

Interactive video
•
4th Grade - University
25 questions
Identifying Parts of Speech

Quiz
•
8th Grade - University
10 questions
Spanish Greetings and Goodbyes!

Lesson
•
6th Grade - University