Python Programming Quiz

Python Programming Quiz

11th Grade

15 Qs

quiz-placeholder

Similar activities

Visual Basic 2010

Visual Basic 2010

8th Grade - University

10 Qs

Skill Competition Quiz 2024

Skill Competition Quiz 2024

10th Grade - University

20 Qs

Test on Python Function

Test on Python Function

11th - 12th Grade

12 Qs

Types of Mass Media

Types of Mass Media

10th Grade - Professional Development

11 Qs

Coding Karel 2

Coding Karel 2

KG - University

20 Qs

Word 2016 Lesson 1

Word 2016 Lesson 1

9th - 12th Grade

10 Qs

Computer Hardware - CPU & GPU

Computer Hardware - CPU & GPU

7th Grade - University

16 Qs

ICT as Platform for Change

ICT as Platform for Change

11th - 12th Grade

10 Qs

Python Programming Quiz

Python Programming Quiz

Assessment

Quiz

Computers

11th Grade

Practice Problem

Hard

Created by

Rajath Vijayakumar

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?