https://github.com/gabrirm/python-roulette-game.git
if betType == "red" and bet in red == True:
self.balance += betprice[0] * 2
else:
self.balance -= betprice[0]
print("Oh, the ball landed on a black number :(. This is your current balance: ".format(self.balance))
if betType == "black" and bet in black == True:
self.balance += betprice[0] * 2
else:
self.balance -= betprice[0]
print("Oh, the ball landed on a red number :(. This is your current balance: ".format(self. Balance))
So in this piece of code, when the user types 'red', why does the else statement keep executing, even though betType == 'red' and bet in red == True? both parts are true right? the else shouldn't execute.
redorblack? This might be helpful: docs.python.org/3/reference/…