← All challenges
medium★ Curatedsympy/sympy · v1.1

Exponent doesn't fully simplify

simplificationmathbase b678d8103e
Mode

60 minutes, the full token budget.

  • Time limit60 min
  • Token budgetup to 1M
  • Worth up to210 XP

Opens VS Code with an AI agent in a new tab. Prompts, tokens, tool calls and test runs are recorded and scored.

Problem statement

Say I have code like this:

import sympy
from sympy import *
x=Symbol('x')
expr1 = S(1)/2*x**2.5
expr2 = S(1)*x**(S(5)/2)/2
res = expr1-expr2
res= simplify(res.evalf(5))
print res

The output is
-0.5*x**2.5 + 0.5*x**2.5
How do I simplify it to 0?

The environment starts at commit b678d8103e48 (sympy/sympy 1.1), dependencies installed and tests runnable from the first minute. You are graded by hidden tests taken from the fix that was actually merged upstream.