Not getting desired output

I am not able to find what’s wrong in the code… it seems fine to me