feat: add join-corresponding-sums
This commit is contained in:
@@ -2,6 +2,10 @@ from app.schemas.grade_1.compose_and_decompose_numbers import (
|
||||
ComposeAndDecomposeNumbersProblem,
|
||||
ComposeAndDecomposeNumbersRequest,
|
||||
)
|
||||
from app.schemas.grade_1.join_corresponding_sums import (
|
||||
JoinCorrespondingSumsProblem,
|
||||
JoinCorrespondingSumsRequest,
|
||||
)
|
||||
from app.schemas.grade_1.join_pictures_with_quantity import (
|
||||
JoinPicturesWithQuantityProblem,
|
||||
JoinPicturesWithQuantityRequest,
|
||||
@@ -18,6 +22,8 @@ from app.schemas.grade_1.where_are_more_items import (
|
||||
__all__ = [
|
||||
"ComposeAndDecomposeNumbersProblem",
|
||||
"ComposeAndDecomposeNumbersRequest",
|
||||
"JoinCorrespondingSumsProblem",
|
||||
"JoinCorrespondingSumsRequest",
|
||||
"JoinPicturesWithQuantityProblem",
|
||||
"JoinPicturesWithQuantityRequest",
|
||||
"SumWithImageReferenceProblem",
|
||||
|
||||
32
app/schemas/grade_1/join_corresponding_sums.py
Normal file
32
app/schemas/grade_1/join_corresponding_sums.py
Normal file
@@ -0,0 +1,32 @@
|
||||
from pydantic import BaseModel, Field, PositiveInt
|
||||
|
||||
|
||||
class AdditionExpression(BaseModel):
|
||||
position: PositiveInt
|
||||
first_addend: PositiveInt
|
||||
second_addend: PositiveInt
|
||||
total: PositiveInt
|
||||
match_id: str = Field(min_length=1)
|
||||
|
||||
|
||||
class SumConnection(BaseModel):
|
||||
match_id: str = Field(min_length=1)
|
||||
total: PositiveInt
|
||||
left_position: PositiveInt
|
||||
right_position: PositiveInt
|
||||
|
||||
|
||||
class JoinCorrespondingSumsProblem(BaseModel):
|
||||
instructions: str = "Conecta."
|
||||
left_expressions: list[AdditionExpression]
|
||||
right_expressions: list[AdditionExpression]
|
||||
answer_key: list[SumConnection]
|
||||
|
||||
|
||||
class JoinCorrespondingSumsRequest(BaseModel):
|
||||
pair_count: PositiveInt = 3
|
||||
min_sum: PositiveInt = 2
|
||||
max_sum: PositiveInt = 10
|
||||
min_addend: PositiveInt = 1
|
||||
max_addend: PositiveInt = 9
|
||||
seed: int | None = None
|
||||
Reference in New Issue
Block a user