Should I create another function or something? Thanks in advance to anyone who helps =) That's how far I have gotten, but I know it's wrong. As I have said, I am quite new to programming, and have only been able to do the following code:īet = raw_input('Please enter either a number between 0 and 36, or choose 'odd' or 'even'')
However, I'm stuck on how to go about doing this. (So if they guess if the random number generate is odd or even correctly, they win). If it's odd, it should give them the message 'Little Win'. If it isn't right, then it should display something like 'Sorry, you have won nothing'.īUT, if the user inputted 'odd' as their bet, it should check to see if it is an odd or even number. If it does, you have won and it should say 'Big Winner'. What I need to do, is for the program to check if the bet is an integer or not, and if it is, see if it matches the random number that was made.
It then generates a random number between 0 and 36. It asks for a number between 0 and 36, or it asks for you to place a bet on it being an odd or even number. Right, I am trying to create a Roulette type of game in Python. I'm relatively new at programming, and Python is my first language so please take that into consideration before you read on.