Page 79 - Modular v1.1 Pyhton
P. 79
Exercise
A. Tick ( ) the correct option.
1. Which of the following indicates an empty list?
a. { } b. [ ]
c. ( ) d. <>
2. Which of the following list contains another list?
a. Nested list b. Empty list
c. Joint list d. None of the above
3. Which of the following does negative indexing means?
a. index of -0 refers to the last elements of the list
b. index of -1 refers to the last elements of the list
c. index of -2 refers to the last elements of the list
d. index of -3 refers to the last elements of the list
4. Which of the following operator is used to access the list elements within a specific range of
positive and negative indexing?
a. # b. :
c. * d. <>
5. Which of the following method is used to add one element to the list?
a. append( ) b. extend( )
c. insert(x, a) d. remove( )
B. Write 'T' for true and 'F' for false.
1. Traversing means accessing the elements of a list. ………………
2. The index of elements of a list starts from 1. ………………
3. Nested list can be traversed by using the index operator. ………………
4. Lists are immutable. ………………
5. The extend( ) is used to add more than one elements to a list. ………………
C. Fill in the blanks using the words given below.
mutable, +, item, indexing, homogeneous
1. List is a …………………… collection of data elements.
2. In list, each element or value is called an …………………… .
3. To access the list elements …………………… is used.
4. …………………… means the elements of a list can be changed or new elements can be added into
a list.
5. To join the two list together …………………… operator is used.
List in Python 77

