Hey, guys. I am relatively new to programming, so please bear with me.
I’ve recently finished the first challenge - I used IDLE to write the code before moving it to Replit. The script works fine except when I run main and the tests, which it fails entirely. Below pictures of the outcome on replit (while running my code alone).
print('Error: Too many problems.')
> sys.exit()
E SystemExit
You are supposed to return error messages - not print and exit.
expected_output = 'Error: Numbers must only contain digits.'
fail_message = 'Expected calling "arithmetic_arranger()" with a problem that contains a letter character in the number to return "Error: Numbers must only contain digits."'
> ???
Seems like you are not returning anything here.
> second_digits.append(int(second[k]))
E ValueError: invalid literal for int() with base 10: '3g5'
When the provided “thing” isn’t a number, you still try to cast it to an integer. So you are not catching this invalid input properly.