Page 63 - Touchcode_C8_Flipbook
P. 63
Coding fact
In 1992, Iverson was the first person to use the term ‘Bubble sort’.
At a Glance
An array is an arrangement of objects.
Declaration of array with variables of Integer data type is: arr = [10, 20, 30, 40, 50, 60];
Sorting is the process of arranging items in a collection.
To search an element in an array, Python uses indexing method.
An array is an arrangement of objects.
Declaration of array with variables of Integer data type is: arr = [10, 20, 30, 40, 50, 60];
Sorting is the process of arranging items in a collection.
To search an element in an array, Python uses indexing method.
Exercise
A. Tick ( ) the correct option.
1. Which statement best describes arrays?
a. A data structure that shows a hierarchical behavior.
b. Container of objects of similar data types.
c. Array is not a data structure.
d. Arrays stores elements of different data types.
2. Which of the following are advantages of arrays?
a. Easier to store elements of similar data type.
b. Elements stored in an array cannot be sorted.
c. You can only store variables with same data types in an array.
d. The variables in an Array are always ordered sequentially with the index
starting from 0.
Programming with Arrays 61

