Get average of a row

T

Totti

Hi everyone,
I am wondering how can i get the average of each row of grades from a
database (M$ACCESS) and display it in a TextBox
i Have Data such as
---Student----Pro1--Pro2--Pro3--Pro4--Pro5--Ex1--Ex2--Fin--Avg--Let
' 999999006 '' 82 '' 90 '' 83 '' 78 '' 45 '' 100 '' 78 ''
65 '
' 999999034 '' 89 '' 90 '' 100 '' 89 '' 76 '' 89 '' 73 '' 56 '
' 999999041 '' 56 '' 76 '' 78 '' 89 '' 100 '' 89 '' 78 '' 78 '
' 999999042 '' 100 '' 120 '' 130 '' 100 '' 99 '' 99 '' 99 '' 100 '

I need to find the Average of these students for the whole semester
and display it under Avg, this should be done through VB not Access,
and then find and display the letter Grade for the Avg (A+;A-;B...)
These grades are not of the same weight, like projects are 10% of Avg,
exams are 20% etc.

what i have done so far is fetch the data and display it in the
textbox, i am left with finding the AVG and The Letter Grade for
ranges of Grades, Would anyone please assist me?
Thanks in advance
 
F

Family Tree Mike

Totti said:
Hi everyone,
I am wondering how can i get the average of each row of grades from a
database (M$ACCESS) and display it in a TextBox
i Have Data such as
---Student----Pro1--Pro2--Pro3--Pro4--Pro5--Ex1--Ex2--Fin--Avg--Let
' 999999006 '' 82 '' 90 '' 83 '' 78 '' 45 '' 100 '' 78 ''
65 '
' 999999034 '' 89 '' 90 '' 100 '' 89 '' 76 '' 89 '' 73 '' 56 '
' 999999041 '' 56 '' 76 '' 78 '' 89 '' 100 '' 89 '' 78 '' 78 '
' 999999042 '' 100 '' 120 '' 130 '' 100 '' 99 '' 99 '' 99 '' 100 '

I need to find the Average of these students for the whole semester
and display it under Avg, this should be done through VB not Access,
and then find and display the letter Grade for the Avg (A+;A-;B...)
These grades are not of the same weight, like projects are 10% of Avg,
exams are 20% etc.

what i have done so far is fetch the data and display it in the
textbox, i am left with finding the AVG and The Letter Grade for
ranges of Grades, Would anyone please assist me?
Thanks in advance

Well, basically you sum the projects separatly from the exams, get the
averages for each, then multiply by the weights. So looking at row one:

Projects Sum: 378
Projects Avg : 76
Exam Sum : 178
Exam Avg : 89
Final : 65

So the average is:
avg = (76 * 0.10) + (89 * 0.20) + (65 * 0.70)

So the first student has an average of 71. You then need to find the letter
grade by some means based on the 71.
 
J

James Hahn

You haven't explained what part of the process you are having a problem
with. Is it that you need to extract the raw scores from the data in the
textbox, or do you need to know how to calculate a weighted average average
of scores, or is the problem in developing a routine to assign the grades to
the calculated average?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top