Practice
- Problem 1 : Write a function count_abc that has 3
parameteres: 2D list of characters, row size and col size. The
function finds and returns the number of times letter a appears in
the 2D list, the number of times letter b appears in the 2D list, and the
number of times letter c appears in the 2D list. Write a program that
randomly generates a 2D list of characters. The program uses
function count_abc to count the number of occurrences of a, b and c in the
2D list.
- Problem 2 : Write a function: sum_col that has 3
parameteres: 2D list of integers, row size and col size. The function
finds and returns the sum of elements in each COLUMN. The counters are
stored in 1D list of integers, so the function will return one dimensional
list of integers. Write main to test your function.