Test cases resulting wrong

what might be the error in my code?

Please provide the link to your code

There should be a space after each comma.