Assuming that nothing happens until the user has entered some input, your game is a 'while' loop with an 'input' statement and code to process that input.
Usually, you also want to print something before asking the next input, so the user knows what happened too.
You could try hangman as first text-based game, as there is very little processing to do there.
As for best way to write code, the opinions vary :) In fact, as you get more experienced you'll find new and better ways to express the same thing. Thus even the same person changes opinion over time.
In my experience, the best strategy is to start small, and slowly make it bigger. When you realize things get too large, or cannot be handled easily, stop adding and think of a better solution. Likely this will happen a few times before you get it right (and this is normal, I have programmed for 30 years, and still have this problem), but every time you find it went wrong, you learn a little so you can avoid the same mistake the next time.
As for fixing, you can either fix the code that you have at that point in time, or you can go back to an earlier version (if you have that), or you can start from scratch again. Every option has different advantages and disadvantages, as you'll find out.
Last but not least, let others read your code (the technical term is "code review" although that is a bit more formal), and read code of others. While it is scary at first, and getting comments on your work may feel awkward, it is generally given in positive spirit, as points where you can improve.
The more important part however is the explanation how to improve those points. That's the real gold, knowledge how to get better real quickly.
You can ask for a code review right here, just post the code (use the "<>" symbol for the code, as that makes it look good). You can also post code fragments that way if you have a question about some particular part.
@Anri: Python does not have a "switch" statement, you code it as a "if ..: ... elif .. : ... elif ... : ... else: ..." sequence.
Does it not have a switch statement? OMG, thats a nightmare! :blink:
Quite surprised at that, Alberth. Any idea as to why its not got a switch?