Question

Write a program using Matlab that asks the user for their last three grades and final...

Write a program using Matlab that asks the user for their last three grades and final grade and gives them their overall final grade. The three Midterms are worth 70% and Final is worth 30%. The program will display their Final grade with a grade letter corresponding to it. Run your program and verify that it operates correctly (hint: you might need to use “If, else statements”)

Homework Answers

Answer #1

Matlab Code:

m1=input("Enter Midterm1 Marks");
m2=input("Enter midterm2 marks");
m3=input("Enter midterm3 marks");
f1=input("Enter final marks");
mid=((m1+m2+m3)/300)*70
final=((f1/100)*30)
n=mid+final
if n >= 91

grade='A';

elseif n >= 81

grade='B';

elseif n >= 71

grade='C';

elseif n >= 61

grade='D';

else

grade='F';

end

disp(grade);

Output Screenshot:

Thank you have a great day.........please do like:)-

Know the answer?
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
Similar Questions
Matlab: As the user to input 4 quiz grades and 2 test grades. Calculate the final...
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.
11. First and Last Design a program that asks the user for a series of names...
11. First and Last Design a program that asks the user for a series of names (in no particular order). After the final person's name has been entered, the program should display the name that is first alphabetically and the name that is last alphabetically. For example, if the user enters the names Kristin, Joel, Adam, Beth, Zeb, and Chris, the program would display Adam and Zeb. I need help with creating a python code for this using a sentinel...
C++ Write a program which accepts a numeric test score from the user. It will output...
C++ Write a program which accepts a numeric test score from the user. It will output the letter grade to the user corresponding to the score. Assume no “minus grades” (an A ranges from 90-100, B ranges from 80-89, C ranges from 70-79, D ranges from 60-69 and F is everything else.) Ensure that the score remains in the range of 0 to 100. As an example of the output: Enter your numeric grade and I will tell you your...
Write a program in Python using loop that asks for the names of three runners and...
Write a program in Python using loop that asks for the names of three runners and the time it took each of them to finish a race. The program should display who came in first, second, and third place. Think about how many test cases are needed to verify that your problem works correctly.
Question1: Write a Python Program that asks for the grades of 5 quizzes and then prints...
Question1: Write a Python Program that asks for the grades of 5 quizzes and then prints the highest grade. [6 Marks] Question2: Write a Python Program that does the following tasks. [8 Marks] Create an empty list Ask the user for 5 positive numbers and append them to the list Find and print the sum of all the numbers in the list Delete the last element from the list and then print the list Question3: Consider you have the following...
Write a program that asks the user to enter three different integers; if the entered three...
Write a program that asks the user to enter three different integers; if the entered three integers contain two or more that are the same, print message "wrong input"; otherwise the program prints the largest number in the three. Implement your code using decision structures (namely, if and/or if-else). In the execution of your code, try the following test cases. Test case 1: input (3, 4, 5) Test case 2: input (3, 3, 5) Test case 3: input (3, 5,...
Write a program that asks a user to enter his/her phone number. Then remove all the...
Write a program that asks a user to enter his/her phone number. Then remove all the non-digits from the phone number and then display the digits entered. Hint: you may need to use the syntax “.isdigit()” in your program Sample run Example 1 Please enter your phone number?123-456/7891 1234567891 Example 2 Please enter your phone number?123(456)-7891 1234567891 Example 3 Please enter your phone number?987@654!4321 9876544321
Write a C++ program that asks the user to enter in three numbers and displays the...
Write a C++ program that asks the user to enter in three numbers and displays the numbers in ascending order. If the three numbers are all the same the program should tell the user that all the numbers are equal and exits the program. Be sure to think about all the possible cases of three numbers. Be sure to test all possible paths. Sample Runs: NOTE: not all possible runs are shown below. Sample Run 1 Welcome to the order...
write a program that automates the process of generating the final student report for DC faculty...
write a program that automates the process of generating the final student report for DC faculty considering the following restrictions. Consider declaring three arrays for processing the student data: studID studName studGrade The student ID is a random number generated by the 5-digit system in the range of (10000 - 99999). Create a function to assign the student ID generated in an array of numbers. Consider the following to generate the random number: Add the libraries: #include <stdlib.h> #include <ctime>...
Write a java program that creates an integer array with 50 random values, prompts the user...
Write a java program that creates an integer array with 50 random values, prompts the user to enter the index of an element in the array between 0 and 49, then displays the corresponding element value. If the specified index is out of bounds, display an error message (e.g. “Out of Bounds”) and ask the user to enter another index. Use a while loop that will keep prompting the user until a valid input is received. To handle invalid inputs,...