print("you have chosen black")
gamble = input("how much do you want to gamble")
print("you have gambled",gamble)
money_left = money_left - gamble
print("you have",money_left,"left")
spin = random.randint(1,20)
print("It landed on....")
time.sleep(3)
print(spin)
第4行没有工作,money_left已经是变量
获取TypeError:不支持的操作数类型 - :'str'和'str'
答案 0 :(得分:0)
将赌博投射到一个数字
money_left = int(money_left) - int(gamble)