Originally Posted by

**sasam1400** Hi.

I have a task to make a computer program that tests and grades pupils in one school on the following way:

There are 5 grades: 1,2,3,4 and 5;

All the pupils in a class are examined, and they get a score (maximum is 100);

Let's say that MIN is minimal score a pupil got, and MAX is maximum score a pupil got in that class (of 100 possible);

Let's say that DIFF is whole range between MAX and MIN;

Let's say that RANG=(MAX-MIN)/5;

Let's say that X is mean of all scores in a class;

Let's say, taht:

For grade 3, pupil must have score between X-0.5*RANG and X+0.5*RANG;

For grade 4, pupil must have score between X+0.5*RANG and X+1.5*RANG;

For grade 5, pupil must have score over X+1.5*RANG;

Similar,

For grade 2, pupil must have score between X-1.5*RANG and X-0.5*RANG;

For grade 1, pupil must have score below X-1.5*RANG.

I already made the computer program, but for my presentation I need to present the method and the algorithm, so I need a function expression (formula) - of X and RANG - that describes the method.

Any help?