set threshold to >= 50

This commit is contained in:
Thorsten
2016-01-31 21:33:05 +01:00
parent 22fb054aab
commit 951233425e

View File

@@ -52,7 +52,7 @@ def end_question():
win_msg = '{} scores with {:.2f}%'.format(winner, score) win_msg = '{} scores with {:.2f}%'.format(winner, score)
lose_msg = 'nobody scores.' lose_msg = 'nobody scores.'
if score > 50.0: if score >= 50.0:
lines.append(win_msg) lines.append(win_msg)
else: else:
lines.append(lose_msg) lines.append(lose_msg)
@@ -107,7 +107,7 @@ def rate(quizcfg, response, user):
threshold = 50 threshold = 50
if ( if (
percentage > threshold and percentage >= threshold and
float(quizcfg.get('current_max_score', 0)) < percentage float(quizcfg.get('current_max_score', 0)) < percentage
): ):
quizcfg['current_max_user'] = user quizcfg['current_max_user'] = user