Test cases 2 3 4 not passing

here is my code:


it passes test case 0 and 1 but fails later