Fix math
This commit is contained in:
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user