Question: 1 ) First write a function y = gpa ( score , unit ) that has two inputs as score and unit, each input being

1) First write a function y = gpa(score, unit) that has two inputs as score and unit, each input
being an array. The output y is the term GPA. The function must use array operation to calculate
the GPA. The function must be able to handle input arrays of any size.
2) Add a sub-section 4 to the Problem 1 script. In this sub-section, assign values to the 2 inputs
the score and unit arrays. Call the gpa function of part 1 to output the term GPA y. Display the
term GPA with only 2 places after the decimal (hint: use the appropriate format command).

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 Programming Questions!