please do it properly. don\'t use font for.answer Part 2: MATLAB Exercise 1 (25
ID: 3744118 • Letter: P
Question
please do it properly. don't use font for.answer
Part 2: MATLAB Exercise 1 (25 pts) In this problem, you will be writing a MATLAB script that will compute and display a student's grade in a course. The student (user) will have to input their grades for Test 1, Test 2, and the Final Exam. The program computes the course average assuming Test 1 and Test 2 each count 30% and the Final Exam counts 40%. The program should round the course average to the nearest integer using round. The program will output the statement Your Course Average is: followed by the rounded course average. The program will then output the statement Your Course Grade Is: followed by the course grade. Assume the following grading scale 290 A 80 89 70 - 79 60- 69Explanation / Answer
test1 = input('Enter grade for Test 1: '); test2 = input('Enter grade for Test 2: '); final = input('Enter grade for Final: '); average = test1*0.3 + test2*0.3 + final*0.4; fprintf('Average score is %.1f ', average) if average >= 90 grade = 'A'; elseif average >= 80 grade = 'B'; elseif average >= 70 grade = 'C'; elseif average >= 60 grade = 'D'; else grade = 'F'; end fprintf('Your grade is %s ', grade)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.