fixed bug, where your answer was regarded as wrong when it contained uppercase letter in the .tst file
This commit is contained in:
parent
2b7a21aee1
commit
764de673e1
2 changed files with 29 additions and 9 deletions
19
tests/PSP.tst
Normal file
19
tests/PSP.tst
Normal file
|
@ -0,0 +1,19 @@
|
|||
0.0
|
||||
H/Vodík
|
||||
He/Helium
|
||||
Li/Lithium
|
||||
Be/Beryllium
|
||||
B/Bor
|
||||
C/Uhlík
|
||||
N/Dusík
|
||||
O/Kyslík
|
||||
F/Fluor
|
||||
Ne/Neon
|
||||
Na/Sodík
|
||||
Mg/Hořčík
|
||||
Al/Hliník
|
||||
Si/Křemík
|
||||
P/Fosfor
|
||||
S/Síra
|
||||
Cl/Chlor
|
||||
Ar/Argon
|
|
@ -53,7 +53,8 @@ def on_closing(): #zobrazi se pri zavirani programu, pokud se uzivatel rozhodne
|
|||
|
||||
def submitAnswer(uselessArgument): # precte pole pro zadani odpovedi, zhodnoti ji, a vhodnym zpusobem zmeni score a highscore
|
||||
global score
|
||||
if answerEntry.get().lower() in test[1] [questionPlace]:
|
||||
for i in test[1][questionPlace]:
|
||||
if answerEntry.get().lower() == i.lower():
|
||||
score += timeMultiplier
|
||||
currentScore.set('Score: %s' % (score))
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue