Question

Matlab: As the user to input 4 quiz grades and 2 test grades. Calculate the final and letter grad...

Matlab: As the user to input 4 quiz grades and 2 test grades. Calculate the final and letter grade when quizzes are worth 50% of the grade and each test is worth 25% of the grade. Display the final grade to the tenth along with the letter grade.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

//This is the code in MATLAB.

function [G,L]=final_grade(Q1,Q2,Q3,Q4,T1,T2) //Here G is the Final grade and L is the Letter for the Grade.

Quiz_score=(Q1+Q2+Q3+Q4)/4; // Q1,Q2,Q3,Q4 are the user Quiz Grades and T1,T2 are the test scores.

Quiz_Percentage=Quiz_score*(50/100);

Test1_Percentage=T1*(25/100);

Test2_Percentage=T2*(25/100);

G=Quiz_Percentage+Test1_Percentage+Test2_Percentage; // final grade percentage

if(G>=90 && G<=100)

{ L='A' ; }

elseif(G>=80 && G<90)

{ L='B' ; }

elseif(G>=70 && G<80)

{ L='C' ; }

elseif(G>=60 && G<70)

{ L='D' ; }

elseif(G>=50 && G<60)

{ L='E' ; }

else

{ L='F' ; }

Add a comment
Know the answer?
Add Answer to:
Matlab: As the user to input 4 quiz grades and 2 test grades. Calculate the final and letter grad...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • MATLAN Quiz 2 Create a MATLAB function that calculates the average of values in a vector that als...

    MATLAN Quiz 2 Create a MATLAB function that calculates the average of values in a vector that also drops the slowest values. Call this function average_drop(). The function must have a single input (the vector) and a single output (the average without the lowest score). 1. 2. Create a MATLAB program that asks the user to input grades for a student and calculates the final grade and letter grade. The user must enter 5 quiz grades (worth 50% of the...

  • C++ Write a program to calculate final grade in this class, for the scores given below...

    C++ Write a program to calculate final grade in this class, for the scores given below . Remember to exclude one lowest quiz score out of the 4 while initializing the array. Display final numeric score and letter grade. Use standard include <iostream> Implementation: Use arrays for quizzes, labs, projects and exams. Follow Sample Output for formatting. May use initialization lists for arrays. Weight distribution is as follows: Labs: 15% Projects: 20% Quizzes: 20% Exams: 25% Final Project: 20% Display...

  • Write a program to calculate your final grade in this class. Three(8) assignments have yet to...

    Write a program to calculate your final grade in this class. Three(8) assignments have yet to be graded: Quiz 7, Lab 7 and Final Project. Assume ungraded items receive a grade of 100 points. Remember to drop the lowest two quiz scores. Display final numeric score and letter grade. Implementation: Weight distribution is listed in canvas. Use arrays for quizzes, labs, projects and exams. You are allowed to use initialization lists for arrays. Use at least three (3) programmer defined...

  • c++ implement a student class Determine the final scores, letter grades, and rankings of all students...

    c++ implement a student class Determine the final scores, letter grades, and rankings of all students in a course. All records of the course will be stored in an input file, and a record of each student will include the first name, id, five quiz scores, two exam scores, and one final exam score. For this project, you will develop a program named cpp to determine the final scores, letter grades, and rankings of all students in a course. All...

  • Matlab a) Write a MATLAB code that takes the grade letters from the user and provide him/her with the GPA for that seme...

    Matlab a) Write a MATLAB code that takes the grade letters from the user and provide him/her with the GPA for that semester Enter your grades (letters): AABBC (input) Your GPA is 3.2 output) b) Write a Matlab user defined function to that takes a letter grade and return a numeric grade as shown in the table below. Any other value should give an error message (Invalid Grade). You function name should be Letter2Grade Use the following information to calculate...

  • Elaine gets quiz grades of 67, 64, and 87. She gets a 84 on her final...

    Elaine gets quiz grades of 67, 64, and 87. She gets a 84 on her final exam. Find the weighted mean if the quizzes each count for 15% and the final exam counts for 55% of the final grade. O 1) 72.1 2) 75.5 3) 78.9 4) 78.3

  • C++ Grades . Write a program that uses enum types to assign letter grades that can...

    C++ Grades . Write a program that uses enum types to assign letter grades that can be automatically converted to numerical grades. For this assignment, you'll create an enum type with the values F, D, C, B, and A, so the letter grades are associated with ordinal values 0, 1, 2, 3, and 4, respectively (which coincide with the quality points for that grade). Write a method assignCourseGrade(double grade) which takes a real number representing the grade for the class,...

  • Many classes calculate a final grade by using a weighted scoring system. For example, “Assignments” might...

    Many classes calculate a final grade by using a weighted scoring system. For example, “Assignments” might be worth 40% of your final grade. To calculate the grade for the Assignments category, the teacher takes the percentage earned on the assignments and multiplies it by the weight. So if the student earned a 90% total on the Assignments, the teacher would take 90% x 40, which means the student earned a 36 percent on the Assignments section. The teacher then calculates...

  • b) (2.5 marks) Write a Matlab user defined function that takes the letter grades (i.e. AABBC) as input and returns...

    b) (2.5 marks) Write a Matlab user defined function that takes the letter grades (i.e. AABBC) as input and returns if the student entitled to the honor list or not. The student is considered in the honor s f he or she satisfies the following three conditions: a. An average GPA of 3.5 and above and b. At least two classes with A mark and e. no class with a mark less than C (i.e. no D or F) The...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT