snhandle
asked on
Python - Average Score evaluation - Arrays
I want to do this through Python. I have two files, one employees and the second one "Evaluation", both are in notepad. I want to create arrays where it should
give me the results like below, should match the employee number in evaluation file and if it is there then it should add all the score and divide it by how many lines for that employee and get the average score, if the score is above between 90 to 100 then Excellent, if 80 to 89 Very Good, If 70 to 79 then Good and if 60 to 69 then fair, otherwise poor.
[['1215', 'John', 'Davis', '87', '84', '90', '78', '86', '85.0', 'Very Good'], ['1244', 'Kerry', 'David',
'79', '96', '83', '89', '88', '72', '84.5', 'Very Good'], ['1400', 'Smith', 'Harris', '86', '96', '73', '74', '89',
'86', '92', '85.14', 'Very Good'], ['3458', 'Wood', 'John', '88', '68', '70', '89', '77', '84', '93', '67',
'79.5', 'Good']]
employees.txt
Evaluation.txt
give me the results like below, should match the employee number in evaluation file and if it is there then it should add all the score and divide it by how many lines for that employee and get the average score, if the score is above between 90 to 100 then Excellent, if 80 to 89 Very Good, If 70 to 79 then Good and if 60 to 69 then fair, otherwise poor.
[['1215', 'John', 'Davis', '87', '84', '90', '78', '86', '85.0', 'Very Good'], ['1244', 'Kerry', 'David',
'79', '96', '83', '89', '88', '72', '84.5', 'Very Good'], ['1400', 'Smith', 'Harris', '86', '96', '73', '74', '89',
'86', '92', '85.14', 'Very Good'], ['3458', 'Wood', 'John', '88', '68', '70', '89', '77', '84', '93', '67',
'79.5', 'Good']]
employees.txt
Evaluation.txt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER