Can someone plz help. I’m not getting any errors, but my code isn’t working. It is only able to use the else command I have.
https://www.codecademy.com/practice/projects/games-of-chance
Q no. 4
Cho-Han game
Here is my code so far:
import random
total_one = random.randint(1,6)
total_two = random.randint(1,6)
total = total_one + total_two
even = (2) or (4) or (6) or (8) or (10) or (12)
odd = (1) or (3) or (5) or (7) or (9) or (11)
def dice_roll (guess, bet):
money = 100
if (total == even) and (guess == even):
money = money + bet
print ("You won. Your total is now " + str(money))
if (total == even) and (guess == odd):
money = money + bet
print ("You lost. Your total is now " + str(money))
else:
money = money - bet
print ("You lost. Your total is now " + str(money))
dice_roll(odd, 30)