Spaces:
Running
Running
Update solver.py
Browse files
solver.py
CHANGED
@@ -88,8 +88,8 @@ def process_expression(expr_str):
|
|
88 |
|
89 |
elif 'factorial' in processed_expr: # Factorial case
|
90 |
expr = parse_expr(processed_expr, transformations=(standard_transformations + (implicit_multiplication_application,)))
|
91 |
-
result = expr.doit() #
|
92 |
-
return f"{format_expression(expr)} = {
|
93 |
|
94 |
|
95 |
elif '/' in expr_str: # Handle fractions and return decimal
|
|
|
88 |
|
89 |
elif 'factorial' in processed_expr: # Factorial case
|
90 |
expr = parse_expr(processed_expr, transformations=(standard_transformations + (implicit_multiplication_application,)))
|
91 |
+
result = expr.doit() # Compute the factorial correctly
|
92 |
+
return f"{format_expression(expr)} = {result}"
|
93 |
|
94 |
|
95 |
elif '/' in expr_str: # Handle fractions and return decimal
|