Correcting my code

This is answered in the guide. It rings hollow to “thank” people if you do not consider the information they have already given you. If you read it and encountered a problem with the explanation, then you should show how you tried to use that information: i.e., show the new code and show clearly what went wrong when you tried it.

Please also read the pinned thread and make sure you understand how to post code with proper formatting, so that we can properly see how you have typed it.

We can only possibly help understand what went wrong with code, if you actually show that code. Saying that you “tried multiple ways” is not helpful, because it does not let us see any of those ways. It comes across as simply trying to justify that you deserve the help. That justification isn’t necessary; this is a help forum, after all.