This code shows some kinda logic error

I’m unable to figure out the error in the given code.please cosider the code giveen below and let me know the error.

following is the code:

@Mudit809
Your code and question don’t match
please check it again