Spaces:
Runtime error
Runtime error
make function returning sequence return proper one
Browse files- scripts/quiz/utils.py +2 -2
scripts/quiz/utils.py
CHANGED
@@ -18,7 +18,7 @@ def get_next_difficulty(difficulty, do_increase: Literal[True, False] = True):
|
|
18 |
return next_difficulty
|
19 |
|
20 |
|
21 |
-
def generate_start_step(difficulty: float, path_to_csv_file: str = "data.csv"):
|
22 |
"""generate start and step values interpolating results to function built from data from file"""
|
23 |
df = pandas.read_csv(path_to_csv_file, delimiter=',', header=0, names=['difficulty', 'start'])
|
24 |
all_rows = df.loc[:]
|
@@ -39,4 +39,4 @@ def generate_start_step(difficulty: float, path_to_csv_file: str = "data.csv"):
|
|
39 |
|
40 |
def convert_sequence_to_string(start, step, sep=", "):
|
41 |
stop = start + 3 * step
|
42 |
-
return sep.join([str(num) for num in range(start, stop, step)])
|
|
|
18 |
return next_difficulty
|
19 |
|
20 |
|
21 |
+
def generate_start_step(difficulty: float, path_to_csv_file: str = "scripts/quiz/data.csv"):
|
22 |
"""generate start and step values interpolating results to function built from data from file"""
|
23 |
df = pandas.read_csv(path_to_csv_file, delimiter=',', header=0, names=['difficulty', 'start'])
|
24 |
all_rows = df.loc[:]
|
|
|
39 |
|
40 |
def convert_sequence_to_string(start, step, sep=", "):
|
41 |
stop = start + 3 * step
|
42 |
+
return sep.join([str(num) for num in range(start, stop, step)]) + sep
|