← All challenges
easysympy/sympy · v1.4

mathematica_code gives wrong output with Max

mathsymbolicbase 9ef28fba5b
Mode

60 minutes, the full token budget.

  • Time limit60 min
  • Token budgetup to 1M
  • Worth up to135 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

If I run the code

x = symbols('x')
mathematica_code(Max(x,2))

then I would expect the output 'Max[x,2]' which is valid Mathematica code but instead I get 'Max(2, x)' which is not valid Mathematica code.

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