This commit is contained in:
Dmitry Bikulov
2025-09-15 19:38:36 +03:00
parent ef0f55afaf
commit 93883a4470
2 changed files with 3 additions and 3 deletions

View File

@@ -52,7 +52,7 @@ class AnswerResponse(BaseModel):
# -----------------
TOTAL_QUESTIONS = 20
DURATION_SECONDS = 60
DURATION_SECONDS = 300
class Session:
@@ -78,7 +78,7 @@ class Session:
@staticmethod
def _generate_questions(n: int) -> List[Dict]:
# Build unique unordered pairs (avoid mirrored duplicates like 6×8 and 8×6)
all_pairs = [(a, b) for a in range(2, 10) for b in range(a, 10)] # a <= b
all_pairs = [(a, b) for a in range(2, 6) for b in range(a, 6)] # a <= b
count = min(n, len(all_pairs))
picked = random.sample(all_pairs, count)