Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

copy and paste the matlab code, in the space provided below Write a script that calculates the average of the grades for a quarter, and

image text in transcribed

copy and paste the matlab code, in the space provided below

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 notes, it starts a for-loop that will ask for the note (in string. A, B, C, D, F) and the

number of credits of each course (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 the F for 3crd of the course3) + 4x4 (4 points of the 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

copiar y pegar el codigo de matlab, en el espacio provisto abajo Escriba un script, que calcule el promedio de las notas de un trimestre, y que cumpla lo siguiente: - cada A=4 ptos. B=3 ptos. C=2 ptos. D=1 pto. F=0 ptos. - preguntar al usuario cuantas notas desea ingresar (minimo 2, maximo 10, para lo cuales debe verificar si cumple el requisito, usando IF) - una vez la persona dice la cantidad de notas, empieza un for-loop que va a preguntar la nota (en string. A, B, C, D, F) y la cantidad de creditos de cada curso (pueden ser de 1 a 4 creditos cada curso) - usando un ciclo IF, asignar los puntos correspondientes y multiplicarlos por los creditos. - al final del programa, debe haber sumado todos los puntos y aparte todos los creditos. luego divide los puntos entre los creditos. - guardar en un vector, cada una de las notas y los creditos Ejemplo: Marcos tomo 4 cursos en el trimestre. sus notas fueron: curso 1: A de 3crd curso 2: B de 1crd curso 3 : F de 3 crd curso 4: A de 4crd por lo tanto los puntos son: 43 ( 4 puntos de la A por los 3 crd del curso1) + 31 ( 3 puntos de la B por 1crd del curso2)+ 03(0 puntos de la F por 3crd del curso3) +44 ( 4 puntos de la A por 4crd del curso4 =31 puntos en total los creditos fueron: 3+1+3+4=11 promedio del trimestre =31/11=2.81 la nota debe ser "redondeada" por encima con 2 decimales

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

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

More Books

Students also viewed these Databases questions

Question

2. Describe why we form relationships

Answered: 1 week ago

Question

5. Outline the predictable stages of most relationships

Answered: 1 week ago