
Python Programming Quiz
Authored by Abhishek Swami
Information Technology (IT)
University
Used 5+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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
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
40 questions
QUIZ SA 314
Quiz
•
University
35 questions
Google Sheet
Quiz
•
10th Grade - University
45 questions
Ujian Akhir Semester 1
Quiz
•
8th Grade - University
35 questions
Kiến thức về thông tin và dữ liệu (Lớp 10)
Quiz
•
10th Grade - University
45 questions
TechJar Round 1
Quiz
•
University
40 questions
AI U1 and U2
Quiz
•
University
40 questions
Ulangan Harian
Quiz
•
11th Grade - University
40 questions
TIK CLASS 7
Quiz
•
7th 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
Discover more resources for Information Technology (IT)
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University