TypeError:第4行的“str”和“str”的操作数类型不受支持如何修复

2024-05-23 17:55:45 发布

您现在位置:Python中文网/ 问答频道 /正文

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号线不工作,钱琰留下的已经是一个变量

获取类型错误:不支持-:“str”和“str”的操作数类型


Tags: you类型inputhaveleftdohowblack