Respuesta :
Answer:
Explanation:
do you know how to do some of it or do you need the whole answer?
Edhesive assignment 4 student schedule python is below:
Explanation:
f = open("score1.txt","r+")
import datetime
time = datetime.datetime.now()
stars = "************************"
lstars = "****************"
def log():
x = open("score1_log.txt","w+")
x.write(stars+"\nProcessing header lines.\n"+stars)
ln = 0
for a in f:
ln += 1
empty2 = "\n\n"
dash = "--------------------"
b = (a.strip()).split(",")
sb = str((b))
c = len(b)
x.write(empty2 + dash + "\n Processing Line {}.\n".format(ln) + dash)
x.write("\nLog Time : {}\n".format(time))
x.write("\nInput Line is ...\n" + a)
x.write("\nGenerated list is...\n" + sb)
x.write("\n\nThe List contains {} values".format(c))
x.close()
next(f)
y = open("score1_grade.txt","w+")
print ("\t\t\t" + lstars + "\n\t\t\tStudents Results\n\t\t\t"+ lstars)
print("\n\n Student Id\t Name \t\t\t Total Mark \t Grade")
print("\n ----------\t ---- \t\t\t ---------- \t -----\n")
for a in f:
b = (a.strip()).split(",")
sd = str(b[0])
if ((len(b) == 7) and (len(sd) == 6)):
m = float(b[3]+b[4]+b[5]+b[6])
g = "F"
if m >= 95:
g = "A+"
elif m >= 90:
g = "A"
elif m >= 85:
g = "A-"
elif m >= 80:
g = "B+"
elif m>= 75:
g = "B"
elif m>= 70:
g = "B-"
elif m>=65:
g = "C+"
elif m >= 60:
g = "C"
elif m >= 55:
g = "C-"
elif m>=50:
g = "D"
else:
g = "F"
print(b[0] +"\n")
score1_log.txt
************************
Processing header lines.
************************
--------------------
Processing Line 1.
--------------------
Log Time : 2018-07-24 20:33:55.491577
Input Line is ...
sid,lname,fname,assignments,midterm,final
Generated list is...
['sid', 'lname', 'fname', 'assignments', 'midterm', 'final']
The List contains 6 values
--------------------
Processing Line 2.
--------------------
Log Time : 2018-07-24 20:33:55.491577
Input Line is ...
000000,bbb,aaa,30,20,50
Generated list is...
['000000', 'bbb', 'aaa', '30', '20', '50']
The List contains 6 values
--------------------
Processing Line 3.
--------------------
Log Time : 2018-07-24 20:33:55.491577
Input Line is ...
300145,Reza,Ahmed,30,20,50
Generated list is...
['300145', 'Reza', 'Ahmed', '30', '20', '50']
The List contains 6 values
--------------------
Processing Line 4.
--------------------
Log Time : 2018-07-24 20:33:55.491577
Input Line is ...
300146,Howe,Ayan,27,10,40
Generated list is...
['300146', 'Howe', 'Ayan', '27', '10', '40']
The List contains 6 values
--------------------
Processing Line 5.
--------------------
Log Time : 2018-07-24 20:33:55.491577
Input Line is ...
300147,Nitasha, Li ,21,8,25
Generated list is...
['300147', 'Nitasha', ' Li ', '21', '8', '25']
The List contains 6 values
--------------------
Processing Line 6.
--------------------
Log Time : 2018-07-24 20:33:55.491577
Input Line is ...
300148,Hashir,ali,27,17,38
Generated list is...
['300148', 'Hashir', 'ali', '27', '17', '38']
The List contains 6 values
--------------------
Processing Line 7.
--------------------
Log Time : 2018-07-24 20:33:55.491577
Input Line is ...
30019,Chau,Kim,30,15,43
Generated list is...
['30019', 'Chau', 'Kim', '30', '15', '43']
The List contains 6 values
--------------------
Processing Line 8.
--------------------
Log Time : 2018-07-24 20:33:55.491577
Input Line is ...
300151,long,Mehtab,10,,30
Generated list is...
['300151', 'long', 'Mehtab', '10', '', '30']
The List contains 6 values
--------------------
Processing Line 9.
--------------------
Log Time : 2018-07-24 20:33:55.491577
Input Line is ...
300152,Hayre,Zaid,10,30
Generated list is...
['300152', 'Hayre', 'Zaid', '10', '30']
The List contains 5 values
--------------------
Processing Line 10.
--------------------
Log Time : 2018-07-24 20:33:55.491577
Input Line is ...
300153,kim,Baker,,,29
Generated list is...
['300153', 'kim', 'Baker', '', '', '29']
The List contains 6 values
--------------------
Processing Line 11.
--------------------
Log Time : 2018-07-24 20:33:55.491577
Input Line is ...
300154,John,Ally,50
Generated list is...
['300154', 'John', 'Ally', '50']
The List contains 4 values
score1.txt
sid,lname,fname,assignments,midterm,final
000000,bbb,aaa,30,20,50
300145,Reza,Ahmed,30,20,50
300146,Howe,Ayan,27,10,40
300147,Nitasha, Li ,21,8,25
300148,Hashir,ali,27,17,38
30019,Chau,Kim,30,15,43
300151,long,Mehtab,10,,30
300152,Hayre,Zaid,10,30
300153,kim,Baker,,,29
300154,John,Ally,50
Learn more about python https://brainly.com/question/14130677
#LearnWithBrainly
