Update app.py
Browse files
app.py
CHANGED
|
@@ -220,10 +220,10 @@ elif selected_function == "問題生成":
|
|
| 220 |
b = random.randint(-10, 10)
|
| 221 |
init_problem = f"(x+ {a})*(x + {b})"
|
| 222 |
expression = init_problem
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
generated_problems.append(result)
|
| 228 |
|
| 229 |
# 方程式の問題生成
|
|
|
|
| 220 |
b = random.randint(-10, 10)
|
| 221 |
init_problem = f"(x+ {a})*(x + {b})"
|
| 222 |
expression = init_problem
|
| 223 |
+
if expression:
|
| 224 |
+
result = expand(expression)
|
| 225 |
+
st.success(f"問題: {result}")
|
| 226 |
+
st.latex(result)
|
| 227 |
generated_problems.append(result)
|
| 228 |
|
| 229 |
# 方程式の問題生成
|