Обновить app/main.py
This commit is contained in:
@@ -78,9 +78,8 @@ class Session:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def _generate_questions(n: int) -> List[Dict]:
|
def _generate_questions(n: int) -> List[Dict]:
|
||||||
# Build unique unordered pairs (avoid mirrored duplicates like 6×8 and 8×6)
|
# 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(2, 10)] # a <= b
|
all_pairs = [(a, b) for a in range(2, 5) for b in range(2, 10)] # a <= b
|
||||||
count = min(n, len(all_pairs))
|
count = min(n, len(all_pairs))
|
||||||
print(count)
|
|
||||||
picked = random.sample(all_pairs, count)
|
picked = random.sample(all_pairs, count)
|
||||||
|
|
||||||
questions: List[Dict] = []
|
questions: List[Dict] = []
|
||||||
|
|||||||
Reference in New Issue
Block a user