Issue regarding test case

I have written the code as much as taught in the lectures and have got the output as asked but somehow I am failing the test cases and the messages are too vague for me to understand my mistake if you could please look into this matter and just clearly tell me what are the criteria I need to fulfill to pass the test cases it would help me write the code and get a better score