0%
0

Get ready, set, go

Time ended


Quiz on Python List

This is a comprehensive MCQ quiz on Python Lists

1 / 15

1. Given a list of letters, L=['a','e','o','u'],

select the correct statement to add one more item, 'i' after 'e' in the list.

2 / 15

2. Which of the following can delete an element from a list, if its value is given?

3 / 15

3. Given a list L=[10,20,30,40,50,60,70],

what would L[-3:99] return?

4 / 15

4. Which of the following can add multiple elements to a list?

5 / 15

5. Given a list L=[10,20,30,40,50,60], what would L[1:4] return?

6 / 15

6. Which of the following will create an empty list?

7 / 15

7. Assume a list:

letters=['a','b','o','c','p'],

What would be displayed in a Python shell for the given expression?

>>>letters[2:5:2]

8 / 15

8. Given a list L=[10,20,30,40,50,60,70],

what would L[2:-2] return?

9 / 15

9. Which of the following function can add only one element to a list ?

10 / 15

10. Which one of the following will always return a list?

11 / 15

11. If L1=[1,3,5] and L2=[2,4,6] then L1+L2 will yield

12 / 15

12. What will be printed with the following python code ?

print(list(range(3)))

13 / 15

13. Given a list L=[10,20,30,40,50,60,70],

what would L[-4:-1] return?

14 / 15

14. A list L has 5 items. Which one of the following statements will return the last element of the list?

15 / 15

15. A python list can contain values of these types:

Your score is

The average score is 0%

Share this quiz with your friends,

 

LinkedIn Facebook Twitter
0%

Rate the quiz

error: Content is protected !!