Python Quiz

Python Quiz

12th Grade

17 Qs

quiz-placeholder

Similar activities

Python File Handling

Python File Handling

12th Grade

15 Qs

12CS (1-5)

12CS (1-5)

12th Grade

20 Qs

file handling

file handling

12th Grade

12 Qs

Understanding Lists in Python

Understanding Lists in Python

12th Grade

15 Qs

Bubble Sort

Bubble Sort

1st Grade - Professional Development

13 Qs

Διαχείριση Αρχείων στην Python

Διαχείριση Αρχείων στην Python

12th Grade

12 Qs

Text Files in Python

Text Files in Python

12th Grade

20 Qs

JAVA string

JAVA string

12th Grade

20 Qs

Python Quiz

Python Quiz

Assessment

Quiz

Computers

12th Grade

Medium

Created by

Rupinder Kaur

Used 1+ times

FREE Resource

17 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is used to comment multiple lines in Python?

//

/* */

''' '''

#

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the range() function in Python do?

Generates a sequence of numbers

Calculates the factorial of a number

Rounds a floating-point number to the nearest integer

Returns the absolute value of a number

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not an IDE (Integrated Development Environment) for Python?

PyCharm

Atom

Visual Studio Code

Django

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which sorting algorithm works by repeatedly swapping adjacent elements if they are in the wrong order?

Quick Sort

Merge Sort

Bubble Sort

Insertion Sort

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary purpose of the __init__ method in Python classes?

To initialize class variables

To define instance methods

To destroy objects

To inherit from a parent class

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a breakpoint in debugging?

To terminate the program

To pause the program's execution at a specific point

To print a message to the console

To run the program in reverse

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What method is used to remove duplicates from a list in Python?

unique()

remove_duplicates()

distinct()

set()

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?