
Python Programming Quiz

Quiz
•
Computers
•
11th Grade
•
Hard
Rajath Vijayakumar
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Python Basics ;)

Quiz
•
11th Grade
16 questions
Subroutines

Quiz
•
9th - 11th Grade
10 questions
Dictionary in Python

Quiz
•
11th - 12th Grade
11 questions
DIctionary

Quiz
•
11th Grade
10 questions
Python Boolean and If

Quiz
•
9th - 12th Grade
16 questions
Loops Exam

Quiz
•
11th Grade
20 questions
Python variables and operators quiz

Quiz
•
9th - 12th Grade
10 questions
Quiz 16 - Arrays and Loops

Quiz
•
11th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade