Run error in first test case

hey,
can you please explain whats wrong with my code and why is it getting run error in first code but it passes the second one

thank you

Hey @kunal132k
Please share ur code in CB ide