Question: Learning outcome: assess student s ability to: Create a 2 D array in a program. Access data in a 2 D array. Define functions with

Learning outcome: assess students ability to:
Create a 2D array in a program.
Access data in a 2D array.
Define functions with the application of 2D array.
Generate and use random numbers.
Activity description: sum of all numbers that are multiple of three in each COLUMN of a 7-by-7 matrix (2D array).
Create a program that will sum all numbers that are multiple of three in each COLUMN of a 2-dimension array. The program will:
Set the size of an array as a global constant variable with value of 7.
define function numbers_random(). Function numbers_random() is used to randomly generate a value between -25 and 25 and return the value as an integer.
Define function populate_numbers(). Function populate_ numbers() is used to populate the 7-by-7 matrix. It means that each cell of the 7 rows and 7 columns will be populated with one random number. This random number is obtained by using function numbers_random().
define function print_number(). Function print_number() is used to print the value in each cell of the 7-by-7 array.
define function sum_mult3_col(). Function sum_mult3_col() is used to sum all numbers that are multiple of 3 in each COLUMN of a 7-by-7 array.
Define function prompt_sum_mult3_col(). The function is used to print the result of the sums as:
Sum all numbers that are multiple of three in column 1=____
Sum all numbers that are multiple of three in column 2=____
Sum all numbers that are multiple of three in column 3=____

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!