Download the ENG1060studentmarks.txt file. The file contains the following information: 1. Column 1: Student ID 2. Column 2—11: Lab marks (/10) worth 2% each (20% total of final grade) 3. Column 12: Assignment mark (/10) worth 10% of the final grade 4. Column 13: Exam mark (/100) worth 70% of the final grade a) Write a function that accepts a student’s laboratory, assignment and exam marks as inputs to determine the final mark to the nearest integer and the letter grade of the student. Your function header would be similar to: function [final_mark, grade] = markscalc(lab, assignment, exam) Note: The letter grades should be stored as a `string’ and are described as follows: final_mark ≥ 80 70 ≤ final_mark < 80 60 ≤ final_mark < 70 50 ≤ final_mark < 60 final_mark < 50 → HD → D → C → P →F
Write an m-file that achieves the following: 1. Prompts the user to input a student’s ID number and extracts the individual assessment marks from the ENG1060studentmarks.txt file. 2. Use the function written in part a) to calculate the student’s final mark and letter grade. Hint: You may want to use logical statements or the find() command to determine the row of the ID number which was input by the user.
Best Answer