Page 64 - Touchcode_C8_Flipbook
P. 64
3. Which method is used to add an element to an array?
a. append() b. add()
c. delete() d. remove()
4. Which method is used to remove an element to an array?
a. append() b. pop()
c. delete() d. remove()
5. Which method is used to arrange elements in either ascending or descending order?
a. sort() b. pop()
c. delete() d. remove()
B. State whether the following statements are true (T) or false (F).
1. The index method can also work on numeric arrays.
2. An array is an arrangement of objects.
3. Arrays are dynamic.
4. Bubble Sort is the simplest sorting algorithm.
5. Sorting is the process of arranging items in a collection.
C. Fill in the blanks.
HELP BOX in-built, readability, adjacent, integer, objects
1. Array declared with data type as integer can only hold ........................... values.
2. Python has ........................... sort function to sort an array.
3. An array is an arrangement of ........................... .
4. Bubble Sort swaps the ........................... elements.
5. Advantage of array is that it improves ........................... of code.
D. Match the following:
1. An array a. arr = [1, 2, 3, 4, 5, 6];
2. Array index starts b. Add an element to an array
3. Declaration of array c. 0
4. Access array values d. Collection of similar data type variables
5. append() e. Index number
62 Touchcode-VIII

