Worksheet 5 - List Manipulation
Worksheet 5 - List Manipulation
GRADE 11
(without using built in functions)
1. WAPS to find minimum element from a list of element along with index.
2. WAPS to find mean of a given list.
3. WAPS to search for an element in the list.
4. WAPS to count the frequency of given element in list of numbers.
5. WAPS to reverse an array of integers.
6. WAP to enter n values from the user. If the entered values are multiples of
9, then add them to the list.
7. WAP that adds 5 to all odd values and 10 to all even values in the list.
8. WAP to find the sum of all values which are ending with 3 from the list.
9. WAP to enter +ve and –ve nos from the user to a list. Create 2 lists to store
these numbers separately.
10.WAP to enter 2 lists. Create a new list which will have 1st element of the
1st list, then 1st element of the 2nd list and so on till the end.
11.WAP that takes two lists of same size and add their values together to
form a new list, whose elements are sums of the corresponding elements
of list1 and list 2.
12. WAP to accept a list and display:
a. Alternate elements
b. Sum and average of all the elements
c. Even elements and odd elements
13.WAP to find the maximum and minimum element in the list.
14.WAP to Search for a particular element and give its first occurrence.
15.WAP to count number of times an element occurs in List.
16.WAP to find frequencies of all elements of a list. Also, print the list of
unique elements in the list and duplicate elements in the given list.
17.WAP to reverse a list.
18.WAP to exchange the values of the first half of the array with the second
half of the array.
a. For example, if the array contains:
i. 2, 4, 1, 6, 7, 9, 23, 10
b. The resultant array is:
i. 7, 9, 23, 10, 2, 4, 1, 6
***