
Python Code Output Quiz
Quiz
•
Other
•
University
•
Practice Problem
•
Hard
Logic While
Used 1+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? x = 10 y = 4 result = x ** y // y + y - x % y print(result)
2504
2502
2494
2498
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code produce? x = 4 y = x | (x >> 1) z = y ^ x print(z)
5
2
1
6
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? x, y = 10, 20 if x > y: result = x - y elif x < y: result = y - x else: result = x + y print(result)
0
10
20
30
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code output? x, y = 15, 25 if x > 10 and y < 30: if x + y > 40: print("Sum exceeds 40") else: print("Sum within range") else: print("Condition not met")
Sum exceeds 40
Sum within range
Condition not met
SyntaxError
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? x = 0 while x < 5: x += 1 if x == 3: continue print(x, end=" ")
1 2 3 4 5
1 2 4 5
1 2 4
Infinite loop
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? for i in range(3): for j in range(i, 3): print(i + j, end=" ")
0 1 2 1 2 3
0 1 2 2 3 4
1 2 3 1 3 4
0 1 2 3 4 5
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? lst = [1, 2, 3, 4] for i in range(len(lst)): lst[i] += lst[-i - 1] print(lst)
[5, 5, 5, 5]
[5, 5, 7, 7]
[8, 6, 6, 8]
[5, 5, 8, 9]
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
15 questions
Políticas Públicas para Idosos no Brasil
Quiz
•
University - Professi...
15 questions
Personal finance 1
Quiz
•
University
20 questions
FUNDAMENTOS DE ADMINISTRACIÓN
Quiz
•
University
15 questions
Diagnosa Gizi - Pertemuan 4
Quiz
•
University
15 questions
KTCT 5
Quiz
•
University
20 questions
Marketing căn bản Chương 3
Quiz
•
University
20 questions
ಕ.ರಾ.ದೈ.ಶಿಕ್ಷಣ."ಜಿಗಿತಗಳು" ರಸಪ್ರಶ್ನೆ ಸ್ಪರ್ಧೆ.ದೈ.ಶಿ.ಶಿ.ಅಂಬಾದಾಸ
Quiz
•
1st Grade - Professio...
20 questions
Microsoft Excel
Quiz
•
KG - Professional Dev...
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 Other
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
