Update app.py
Browse files
app.py
CHANGED
|
@@ -30,7 +30,7 @@ def generate_equation():
|
|
| 30 |
AExpression = expand(init_problem)
|
| 31 |
|
| 32 |
a, b = [random.randint(min_value, max_value) for _ in range(2)]
|
| 33 |
-
Secondarial_init_problem = f"{a}
|
| 34 |
sAExpression = expand(Secondarial_init_problem)
|
| 35 |
|
| 36 |
return AExpression, sAExpression
|
|
@@ -43,7 +43,7 @@ def generate_problem():
|
|
| 43 |
expression = expand(f"(x + {a})*(x + {b})")
|
| 44 |
elif selected_function == "方程式":
|
| 45 |
AExpression, sAExpression = generate_equation()
|
| 46 |
-
expression = Eq(AExpression, sAExpression) if sAExpression else AExpression
|
| 47 |
|
| 48 |
return expression
|
| 49 |
|
|
|
|
| 30 |
AExpression = expand(init_problem)
|
| 31 |
|
| 32 |
a, b = [random.randint(min_value, max_value) for _ in range(2)]
|
| 33 |
+
Secondarial_init_problem = f"{a} - {b}*x"
|
| 34 |
sAExpression = expand(Secondarial_init_problem)
|
| 35 |
|
| 36 |
return AExpression, sAExpression
|
|
|
|
| 43 |
expression = expand(f"(x + {a})*(x + {b})")
|
| 44 |
elif selected_function == "方程式":
|
| 45 |
AExpression, sAExpression = generate_equation()
|
| 46 |
+
expression = Eq(AExpression, sAExpression) if sAExpression else Eq(AExpression, b)
|
| 47 |
|
| 48 |
return expression
|
| 49 |
|