This repository has been archived on 2021-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
scientificComputing/projects/gradetable.py
2018-02-21 18:32:28 +01:00

27 lines
682 B
Python

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%
# grades:
gradestable = [ [ 0.9, 1.0 ], [ 0.84, 1.3 ], [ 0.80, 1.7 ], [ 0.76, 2.0 ], [ 0.72, 2.3 ],
[ 0.68, 2.7 ], [ 0.64, 3.0 ], [ 0.60, 3.3 ], [ 0.56, 3.7 ], [ 0.50, 4.0 ] ]
df = open('notentabelle.dat', 'w')
df.write('# Notentabelle\n')
print '# Notentabelle'
df.write('\n')
df.write('#Key\n')
s = '# Note\tProzent\tPunkte'
df.write(s+'\n')
print s
for f,g in gradestable :
s = ' \t%3.1f\t%5.0f\t%5.1f' % (g, 100.0*f, p100*f)
df.write(s+'\n')
print s
df.close()