+0  
 
0
957
2
avatar

The file classgrades.txt contains student data from a class. Each line of the file consists of a student's last name, a space, and a sequence of integers (separated by spaces), which represent scores on assignments.

Write a Python program to read the data from this file and to write a new file classscores.txt. Each line of classscores.txt should consist of a student's last name followed by a single space and their average score on the assignments, rounded down to the nearest integer.

 

here is classgrades.txt:

 

Chapman 90 100 85 66 80 55
Cleese 80 90 85 88
Gilliam 78 82 80 80 75 77
Idle 91
Jones 68 90 22 100 0 80 85
Palin 80 90 80 90

 

Thanks and have a good day!

off-topic
 Aug 2, 2020
 #1
avatar+738 
0

hi!

 

i wish i could answer this, but unfortunately i dont know python :(

i think you would have much better luck on Stack Overflow, because this site is mostly for math and science 

 Aug 2, 2020
 #2
avatar+1262 
+3

A={'Chapman': '90 100 85 66 80 55', 'Cleese': '80 90 85 88', 'Gilliam': '78 82 80 80 75 77', Idle: 91, 'Jones': '68 90 22 100 0 80 85', 'Palin': '80 90 80 90'}

print(A)

 Aug 2, 2020

3 Online Users

avatar