Design and implement a program that computes final averages for a set of grades. The
program reads the grades from a user. [Marks 20]The format of a grade line is:
N grades1, grades2, …………., grades5
Where N is total number of students and grades is the ith score. All scores must be
between 0 and 100.
The program reads the grades from the user, calculate and display the average.
The weighted average is computed as: (20)
NB: Your program should validate its input. That is, it should make sure each score
is between 0 and 100 and that each student has n scores/ grades. If a student’s
grades are invalid, the program should display an error message. The program
should contain modules / functions that handles validating the input.

1.2 Extend 1.1 so that the program also determines a final letter grade. (10)
The letter grade ranges are:
AVERAGE LETTER GRADE
0-59 F
60-69 D
70-79 C
80-89 B
90-100 A
1.3 Extend 1.2 so that the program computes and display an overall average for the class. I am a first year IT student struggling with this assignment question was wondering anyone could help me please

Recommended Answers

All 7 Replies

Sure thing. Where are you stuck? We will help but we won't do your homework for you. If you don't have any code then I suggest you write pseudo-code and post that.

I don't know where to start and end I don't know how I must answer the question

I don't know how to make a psuedocode or anything regarding IT

@Jack, you can catch up and learn that skill with tutorials. I see them with this search.
https://www.google.com/search?q=psuedocode+tutorial

My quick answer is that psudocode is you writing down the steps to complete your task.

In life you do this all the time. If you need to wash the dishes, you could break it down to steps that others could follow. For coding you design your app/system by thinking out how to accomplish the goal then writing it down. If a step can't be converted into code, then you break down that step to smaller steps until you can code it.

I will strongly suggest that you first read tutorial that will introduce you to programming language as well as the IDE then read how to create your first program in that IDE, how to use controls etc. From there you will have some ideas onto where to start answering the questions.

Here we help by providing solutions to code problems (Errors), unfunctioning properly codes, etc.

Download pdfs, videos trust me it will help a lot.

Do it by hand and write down every step you had to do in order to get it done. Consider pseudo-code like the step-by-step instructions in a recipe.

One thing to consider for part 1.3 - is the answer to this the average of all the averages, or is it the average of all of the individual grades. It is possible that each student has a different number of grades to average so by averaging the averages you are weighting some students differently than others. I'm assuming there can be a different number of grades because the number of grades is entered at the start of every line rather than just once.

I don't know where to start

The assignment is broken down into steps for you, but you can break it down further. Start with

reads the grades from a user. The format of a grade line is: ...

just do that, one step at a time. Read in one line of data and print out what you have read to confirm you have it right. The create a loop so you can read multiple lines (and print out what you have read to confirm you have it right).

Then

All scores must be between 0 and 100.

add code to test for valid input. Try it with valid and some invalid input and print out what you have read to confirm you have it right.

... and so on. Just break it down into the smallest possible steps the code & test each one before moving on.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.