2 test cases not passing


What’s wrong in the code?