Spaces:
Runtime error
Runtime error
update function of getting next level
Browse files- scripts/quiz/utils.py +3 -3
scripts/quiz/utils.py
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
from typing import Literal
|
2 |
|
3 |
-
def get_next_level(
|
4 |
if levep_up:
|
5 |
-
if
|
6 |
return "medium"
|
7 |
else:
|
8 |
return "hard"
|
9 |
else:
|
10 |
-
if
|
11 |
return "easy"
|
12 |
else:
|
13 |
return "medium"
|
|
|
1 |
from typing import Literal
|
2 |
|
3 |
+
def get_next_level(cur_level, levep_up: Literal[True, False] = True):
|
4 |
if levep_up:
|
5 |
+
if cur_level == "easy":
|
6 |
return "medium"
|
7 |
else:
|
8 |
return "hard"
|
9 |
else:
|
10 |
+
if cur_level == "medium":
|
11 |
return "easy"
|
12 |
else:
|
13 |
return "medium"
|