Changed the position of if statement to get better behaviour

Instead of checking the right number of characters after checking if the input is equal to the hidden word I did it before.

1 Like

Its great that you’re looking into different ways to arrange things.

Learning to customize it and not following their steps exactly is valuable experience as copying and pasting (doing everything the same) misses so much understanding.

Good job :slight_smile:

Thank you

@Samik what do you mean by better behaviour? Was your code giving odd results if done in the other way?

No, it was giving the intended behaviour. I just improved the code.

Same here, but checks if the input is equal in length first;

Privacy & Terms