gradetable py3 ready

This commit is contained in:
Jan Grewe 2019-05-15 09:18:22 +02:00
parent 1e928bc5c9
commit 807b1eddab
2 changed files with 23 additions and 23 deletions

View File

@ -1,3 +1,9 @@
All projects:
check for time information
project_adaptation_fit
OK, medium
Add plotting of cost function

18
projects/gradetable.py Normal file → Executable file
View File

@ -1,11 +1,5 @@
import os
import numpy as np
import matplotlib.pylab as plt
lecture = 'Models of Neural Systems, WS 16/17'
exam = 1
pmax = 33 # maximum available points
p100 = 28 # points for 100%
if __name__ == "__main__":
p100 = 33.0 # points for 100%
# grades:
gradestable = [ [ 0.9, 1.0 ], [ 0.84, 1.3 ], [ 0.80, 1.7 ], [ 0.76, 2.0 ], [ 0.72, 2.3 ],
@ -13,14 +7,14 @@ gradestable = [ [ 0.9, 1.0 ], [ 0.84, 1.3 ], [ 0.80, 1.7 ], [ 0.76, 2.0 ], [ 0.7
df = open('notentabelle.dat', 'w')
df.write('# Notentabelle\n')
print '# Notentabelle'
print('# Notentabelle')
df.write('\n')
df.write('#Key\n')
s = '# Note\tProzent\tPunkte'
df.write(s+'\n')
print s
print(s)
for f,g in gradestable :
s = ' \t%3.1f\t%5.0f\t%5.1f' % (g, 100.0*f, p100*f)
s = ' \t%3.1f\t%5.0f\t%5.0f' % (g, 100.0*f, p100*f)
df.write(s+'\n')
print s
print(s)
df.close()