Uploaded by pamdeleonricaforte

Machine Problem 6

advertisement
CS10-8L: Computer Programming Laboratory
Machine Problem #6: Conditional
Name:
Score:
Section:
Date:
OBJECTIVES
● To familiarize the students with the MATLAB interface.
● To enable the students to use some basic operations.
Instructions:
1. Save your file as Surname_Firstname_MP6. Ex. Santos_Jared_W4L6
2. You will submit a zip file containing the following and send it to BB.
a. PDF file of Machine Problem 6 provided with the screenshot of your answers.
b. MATLAB function script with .m extension.
3. Your program must have comments for each section.
Header Comments:
%{
This demo program shows how good a MATLAB program is
Written by: Raymond Sedilla
Date: August 27,2020
Time: 2:20pm
Program: BSIE
Course: CS10-8L
Section: B20
School: Mapua University
%}
4. Please use conditional statements as needed.
MACHINE PROBLEM
Create a script that will do the process of grades computation with the the following
consideration:
1 Major exam : 40%
3 Quizzes : 20%
1 Project : 30%
2 Assignments : 10%
Compute for the average of the grades after user provided the data.
Also, kindly consider the table specification commensurate to the grades computed:
Grades
98-100
95-97
92-94
89-91
86-88
Remarks
1.0
1.25
1.5
1.75
2.0
Prepared by: Raymond Sedilla, Mapua University
CS10-8L: Computer Programming Laboratory
Machine Problem #6: Conditional
83-85
79-82
76-78
75
<75
>100
2.25
2.5
2.75
3.0
5.0
N/A
Sample Output:
Please enter Student Name: Ryan
Please Enter grade for Major Exam: 90
Please Enter grade for Quiz 1: 90
Please Enter grade for Quiz 2: 90
Please Enter grade for Quiz 3: 90
Please Enter grade for Project: 90
Please Enter grade for Assignment 1:90
Please Enter grade for Assignment 2: 90
1 Major Exam's average is 90 and the 40% equivalent is 36
3 Quizzes' average is 90 and the 20% equivalent is 18
1 Project’s average is 90 and the 30% equivalent is 27
1 Assignment's average is 90 and the 10% equivalent is 9
Ryan's total grade is 90 and its equivalent is 1.75
Prepared by: Raymond Sedilla, Mapua University
CS10-8L: Computer Programming Laboratory
Machine Problem #6: Conditional
In the editor window, take a screenshot and paste your output:
Prepared by: Raymond Sedilla, Mapua University
CS10-8L: Computer Programming Laboratory
Machine Problem #6: Conditional
In the command window, take a screenshot and paste your output:
Prepared by: Raymond Sedilla, Mapua University
Download