Right now the function I wrote can only check if the user guessed even or odd and return that much money. How do I incorporate the other rules for roulette and allow the player to guess a number as well as even or odd? I’m also not sure how to put “0” and “00” into the function like it says to.
The roulette function is task number 6.
def roulette(guess, bet): global money x = random.randint(1,36) if x % 2 == 0: spin = "even" elif x % 2 == 1: spin = "odd" if guess == spin: result = "won" money += bet else: result = "lost" money -= bet print( "You spun a %s. You guessed %s. You %s and now have $%.2f" %(x, guess, result, money ) )