0% found this document useful (0 votes)
10 views3 pages

Python_Array_MCQ_Quiz

This document contains a multiple-choice quiz focused on Python lists and arrays. It includes questions about functions for adding and removing elements, checking list size, and performing basic operations. The quiz tests knowledge on specific Python syntax and operations related to lists.

Uploaded by

Pankaj Navale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

Python_Array_MCQ_Quiz

This document contains a multiple-choice quiz focused on Python lists and arrays. It includes questions about functions for adding and removing elements, checking list size, and performing basic operations. The quiz tests knowledge on specific Python syntax and operations related to lists.

Uploaded by

Pankaj Navale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

MCQ Quiz on Python Lists and Arrays

1. What function is used to add an element to the end of a list in Python?

A. insert()

B. add()

C. append()

D. push()

2. Which function is used to remove an element from a list by index?

A. delete()

B. remove()

C. discard()

D. pop()

3. What does the len() function do?

A. Adds elements

B. Returns list size

C. Sorts list

D. Removes elements

4. What will be the output of: print([2, 4, 6][1])?

A. 2

B. 4

C. 6

D. 1

5. Which operator is used to check if a number is even?

A. //

B. /
C. %

D. **

6. What keyword is used to create a loop in Python?

A. loop

B. for

C. repeat

D. while

7. What will be the result of: 10 % 3?

A. 3

B. 1

C. 10

D. 0

8. Which function is used to add the values in a list?

A. add()

B. sum()

C. total()

D. combine()

9. What does codes.remove(4) do?

A. Removes index 4

B. Removes value 4

C. Removes 4 items

D. Removes from end

10. What is the output of print(len([1, 2, 3, 4]))?

A. 3

B. 4
C. 5

D. Error

You might also like