Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USING MATLAB Write a script that calculates the average of the grades for a quarter, and that accomplishes the following: - each A=4 pts. B=3pts.

USING MATLAB
Write a script that calculates the average of the grades for a quarter, and that accomplishes the following:

- each A=4 pts. B=3pts. C=2pts. D=1 pt. F=0 pts.

- ask the user how many notes he wants to enter (minimum 2, maximum 10, for which he must verify if he meets the requirement, using IF)

- once the person says the number of grades, a for-loop begins that will ask for the grade (in string. A, B, C, D, F) and the number of credits for each course (they can be from 1 to 4 credits each course)

- using an IF loop, assign the corresponding points and multiply them by the credits.

- At the end of the program, you must have added all the points and apart all the credits. then divide the points by the credits.

- save in a vector, each of the notes and credits

Example:

Marcos took 4 courses in the trimester. his notes were:

course 1: A of 3crd

course 2: B of 1crd

course 3: F of 3crd

course 4: A of 4crd

therefore the points are: 4x3 (4 points of A for the 3 crd of course1) + 3x1 (3 points of B for 1crd of course2)+ 0x3 (0 points of F for 3crd of course3)+ 4x4 ( 4 points of A for 4crd of the course4 = 31 points in total

the credits were: 3+1+3+4 = 11

quarterly average = 11/31 = 2.81

the note should be "rounded" up to 2 decimal places

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Question Who can establish a Keogh retirement plan?

Answered: 1 week ago