Tell us what’s happening:
After correcting the last verification errors extra 4 spaces
The problem moved to
AssertionError: 'Error: Too many problems.' != ' 11 3801 1 123 1\[79 chars]----'
- Error: Too many problems.
+ 11 3801 1 123 1
+ 4 - 2999 + 2 + 49 - 9380
---- ------ --- ----- ------
: Expected different output when calling "arithmetic_arranger()" with ["11 + 4", "3801 - 2999", "1 + 2", "123 + 49", "1 - 9380"]
----------------------------------------------------------------------
Ran 6 tests in 0.001s
FAILED (failures=1)
Your code so far
if not len(problems) < 5 :
arranged_problems = "Error: Too many problems."
return "Error: Too many problems."
else :
for index, problem in enumerate(problems):
it works but it fails verification no matter how I implement the if statment Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36 Edg/88.0.705.81.
From the readme with the project : * If there are too many problems supplied to the function. The limit is five, anything more will return: Error: Too many problems.
Currently, you have a maximum of 4 problems
Looking at the output, the 5th problem is causing the fail by not having added enough space in this problem or between the 4th and 5th. Maybe the Genius wanted all lines adjusted to the largest space needed for each problem?
well that is the problem it
it should not be worried about the format just the message “Error: Too many problems.”
re init all the variables
verified that the if statement works manually starting
started python
from arithmetic_arranger import arithmetic_arranger
arithmetic_arranger( [“11 + 4”, “3801 - 2999”, “1 + 2”, “123 + 49”, “1 - 9380”])
it works fine “Error: Too many problems.” is the return.
why is the verification failing