Spaces:
Running
Running
""" | |
Concept Handler Module - Contains mock data for fallback when API calls fail | |
""" | |
# Mock concept decomposition result | |
MOCK_DECOMPOSITION_RESULT = { | |
"main_concept": "Equation Solving", | |
"sub_concepts": [ | |
{ | |
"id": "concept_1", | |
"name": "Equality Properties", | |
"description": "Performing the same add, subtract, multiply, or divide operations on both sides of an equation maintains the equality" | |
}, | |
{ | |
"id": "concept_2", | |
"name": "Transposition", | |
"description": "Moving terms from one side of an equation to the other while changing their signs" | |
}, | |
{ | |
"id": "concept_3", | |
"name": "Combining Like Terms", | |
"description": "Combining similar terms in the equation" | |
}, | |
{ | |
"id": "concept_4", | |
"name": "Solution Verification", | |
"description": "Substituting the solution back into the original equation to verify that the equality holds" | |
}, | |
{ | |
"id": "concept_5", | |
"name": "Fractional Equations", | |
"description": "Equations containing fractions, usually requiring finding a common denominator" | |
}, | |
{ | |
"id": "concept_6", | |
"name": "Algebraic Expression", | |
"description": "Expression formed by numbers and letters through a finite number of arithmetic operations" | |
} | |
], | |
"relationships": [ | |
{ | |
"source": "concept_1", | |
"target": "concept_2", | |
"type": "prerequisite" | |
}, | |
{ | |
"source": "concept_2", | |
"target": "concept_3", | |
"type": "related" | |
}, | |
{ | |
"source": "concept_3", | |
"target": "concept_4", | |
"type": "prerequisite" | |
}, | |
{ | |
"source": "concept_1", | |
"target": "concept_5", | |
"type": "related" | |
}, | |
{ | |
"source": "concept_6", | |
"target": "concept_3", | |
"type": "prerequisite" | |
} | |
] | |
} | |
# Mock concept explanation result | |
MOCK_EXPLANATION_RESULT = { | |
"explanation": "Equality properties are fundamental principles in mathematics, stating that when the same mathematical operations (addition, subtraction, multiplication, division) are performed on both sides of an equation, the equality relationship is maintained. This is the basic principle for solving equations. For example, in the equation x+3=5, subtracting 3 from both sides gives x=2, with the equality still holding.", | |
"examples": [ | |
{ | |
"problem": "Solve the equation: 2x + 3 = 7", | |
"solution": "2x + 3 = 7\nSubtract 3: 2x + 3 - 3 = 7 - 3\nSimplify: 2x = 4\nDivide both sides by 2: 2x ÷ 2 = 4 ÷ 2\nResult: x = 2", | |
"difficulty": "Easy" | |
}, | |
{ | |
"problem": "Solve the equation: 3x - 4 = 2x + 5", | |
"solution": "3x - 4 = 2x + 5\nTranspose: 3x - 2x = 5 + 4\nCombine like terms: x = 9\nVerify: 3(9) - 4 = 2(9) + 5\n 27 - 4 = 18 + 5\n 23 = 23 ✓", | |
"difficulty": "Medium" | |
} | |
], | |
"resources": [ | |
{ | |
"type": "Video", | |
"title": "Equality Properties and Equation Basics", | |
"description": "Detailed explanation of equality properties and their applications in equation solving", | |
"link": "https://example.com/equality-properties" | |
}, | |
{ | |
"type": "Article", | |
"title": "Understanding Equality Properties", | |
"description": "Understanding the concept of equality properties through illustrations and examples", | |
"link": "https://example.com/understanding-equality" | |
}, | |
{ | |
"type": "Interactive Tool", | |
"title": "Equation Balance Trainer", | |
"description": "Interactive tool to help understand the concept of balancing both sides of an equation", | |
"link": "https://example.com/balance-equations" | |
} | |
], | |
"practice_questions": [ | |
{ | |
"question": "Solve the equation: 5x - 2 = 13", | |
"answer": "x = 3", | |
"difficulty": "Easy" | |
}, | |
{ | |
"question": "Solve the equation: 4(x - 1) = 2(x + 5)", | |
"answer": "x = 7", | |
"difficulty": "Medium" | |
}, | |
{ | |
"question": "Solve the equation: 2x/3 + 1 = 5/6", | |
"answer": "x = -1/4", | |
"difficulty": "Hard" | |
} | |
] | |
} |