arrays numcols()returns the number of columns in the - array clearvalue )clears the array by setting each element to the given value getitemi )returns the value stored in the - array element at the position indicated by the -tuple ( )both of which must be within the valid range accessed using the subscript operatory [ , setitemi value )modifies the contents of the - array element indicated by the -tuple ( with the new value both indices must be within the valid range accessed using the subscript operatorx[ , to illustrate the use of - arraysuppose we have collection of exam grades stored in text file for group of students that we need to process for examplewe may want to compute the average exam grade for each student or the average grade for each examor both sample text file is illustrated on the left in figure the file contains the grades for multiple studentseach of whom have grades for multiple exams the first line indicates the number of students for whom we have gradesand the second line indicates the number of exams for which each student has grade the remaining lines contain the actual exam grades each line contains the grade for an individual studentwith the grades listed in exam order since we have multiple grades for multiple studentswe can store the grades in - array in which each row contains the grades for an individual student and each column contains the grades for given exam - array used to store the exam grades from the sample file is illustrated on the right in figure figure exam grades(leftstored in text fileand (rightstored in - array the following code segment shows the implementation needed to extract the exam grades from the text file and store them into - array notice that we create the array after extracting the first two values from the file these values indicate the number of students and the number of exams that correspond to the number of rows and columns needed in the array