
Python Programming Quiz
Quiz
•
Computers
•
11th Grade
•
Practice Problem
•
Hard
Rajath Vijayakumar
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? for i in range(3): print(i, end=' ')
0 1 2 3
1 2 3
0 1 2
Error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax for a while loop in Python?
while (condition) {}
while condition:
while: condition
while(condition):
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the break statement do in a loop?
Skips the current iteration
Exits the loop completely
Terminates the program
Repeats the loop
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? x = 10 if x > 5: print("Greater") else: print("Smaller")
Greater
Smaller
Error
None
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid Python if-else syntax?
if (condition): else:
if condition: else:
if condition: elif:
if condition: else:
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of this code? x = 5 if x < 10: if x % 2 == 0: print("Even") else: print("Odd") else: print("Greater")
Even
Odd
Greater
None
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the return statement do in a function?
Stops the function and returns a value
Outputs the value to the console
Iterates through the function
Restarts the function
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
20 questions
Google SketchUp Tool
Quiz
•
KG - University
10 questions
Microsoft Teams
Quiz
•
KG - 12th Grade
15 questions
Unbound Report Quiz
Quiz
•
9th - 12th Grade
20 questions
Python básico
Quiz
•
9th - 12th Grade
11 questions
Access
Quiz
•
10th Grade - University
10 questions
Python Alternating Turns
Quiz
•
7th - 12th Grade
10 questions
Lesson 01 Unit 1 Excel 2019/365 MOAC
Quiz
•
9th - 12th Grade
10 questions
Emerging technologies
Quiz
•
6th 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
