I'm having trouble with the output for this challenge

I am able to complete all of the tasks except for matching the output. For some reason, my subtraction sign is off only on the second value

Replit Link:

Well there are two problems, both stem from the fact you didn’t test the built-in functions you use, before implementing them :wink:

Because the problems are given as strings, using “max()” will be a string operation and for example max("9", "11111") is actually 9. So that’s a not your goal.
Then you use .rjust(maxWordLength) which literally adds spaces in front of the subtraction sign because of the way you placed it.

You also need to check the operator and avoid sum when you need to subtract.

1 Like

Thanks a bunches for your help! I will make these changes.

Thanks! A complete blunder on my side here. I will fix that

Im all set. Thanks again for the help everyone!

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.