233k views
3 votes
Create the IPO Chart, Flowchart, Pseudocode Algorithm, Desk Check and C Program Code that will be used by a school to determine the letter grades of students in a course based on the numeric mark entered. These grades are shown immediately upon entry of each student’s ID and mark, and the process repeats until the user opts to end input. After all students are entered, the program should display the average mark of the entire class along with the ID and score of the highest and lowest performing students. The school’s grading scheme is as follows: 0-49 F 50-59 D 60-74 C 75- 84 B 85-100 A For this scenario only, you may assume no two students will earn the same marks in the course, but you should ensure that only marks within the range of 0-100 are accepted. SAMPLE PROGRAM EXECUTION (user input is shown in blue for reference) Student ID: 100225 Student Mark: 77 Student Grade: B Enter another? Y/N: Y Student ID: 100228 Student Mark: 67 Student Grade: C Enter another? Y/N: Y Student ID: 100229 Student Mark: 91 Student Grade: A Enter another? Y/N: Y Student ID: 100245 Student Mark: 48 Student Grade: F Enter another? Y/N: N Average Score: 70.75 Highest Score: 100229 with a score of 91 Lowest Score: 100245 with a score of 48

1 Answer

4 votes

Final answer:

To determine letter grades for students based on their numeric mark, you can use an IPO chart, flowchart, pseudocode algorithm, desk check, and C program code.

Step-by-step explanation:

To solve this problem, you can use an IPO chart, flowchart, pseudocode algorithm, desk check, and C program code. Here is an example of how you can approach this:

IPO Chart:

Inputs: Student ID and Mark

Process: Calculate the grade based on the numeric mark entered

Outputs: Student Grade

Flowchart:

You can create a flowchart to illustrate the decision-making process of assigning grades based on the numeric mark entered.

Pseudocode Algorithm:

Repeat
Read Student ID
Read Mark
Calculate Grade
Display Student ID and Grade
Calculate Class Statistics
Ask if user wants to enter another student
Until user opts to end input

Desk Check:

You can manually go through the algorithm and perform a desk check to make sure it is correctly assigning grades based on the numeric mark entered. Use sample inputs and calculate the expected outputs to verify the logic.

C Program Code:

Here is a sample C program code:

#include <stdio.h>
#include <stdlib.h>

int main() {
int studentID, mark;
char grade;
int highestScore = -1, lowestScore = 101, totalScore = 0, numStudents = 0;
float averageScore;
char continueInput;

do {
printf("Student ID: ");
scanf("%d", &studentID);

printf("Student Mark: ");
scanf("%d", &mark);

if (mark < 0 || mark > 100) {
printf("Invalid mark. Please enter a mark between 0 and 100.");
continue;
}

if (mark < lowestScore) {
lowestScore = mark;
}

if (mark > highestScore) {
highestScore = mark;
}

totalScore += mark;
numStudents++;

if (mark >= 85) {
grade = 'A';
} else if (mark >= 75) {
grade = 'B';
} else if (mark >= 60) {
grade = 'C';
} else if (mark >= 50) {
grade = 'D';
} else {
grade = 'F';
}

printf("Student Grade: %c\\", grade);

printf("Enter another? Y/N: ");
scanf(" %c", &continueInput);

} while (continueInput == 'Y' || continueInput == 'y');

averageScore = (float) totalScore / numStudents;

printf("Average Score: %.2f\\", averageScore);
printf("Highest Score: %d with a score of %d\\", studentID, highestScore);
printf("Lowest Score: %d with a score of %d\\", studentID, lowestScore);

return EXIT_SUCCESS;
}

User Jbudreau
by
8.2k points