My Report

Python List Test – 1


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement

1. Suppose list1 is [2445,133,12454,123], what is max(list1)?

2. Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1]?

3. What is the output when we execute list("hello")?

4. Which of the following commands will create a list?

5. Suppose listExample is ['h','e','l','l','o'], what is len(listExample)?

6. To shuffle the list(say list1) what function do we use?

7. Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], Which of the following is correct syntax for slicing operation?

8. Suppose list1 is [2, 33, 222, 14, 25], What is list1[:-1]?

9. Suppose list1 is [1, 5, 9], what is sum(list1)?

10. Suppose list1 is [3, 5, 25, 1, 3], what is min(list1)?


 

Start practicing “1000 MCQs on Python”, and once you are ready, you can take tests on all topics by attempting our “Python Test Series”.

Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.