我得到的错误是 += 不是用于 int 和 string 的操作,代码是
while True:
cards = ['2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14']
DC = random.choice(cards)
PC += DC
card = random.choice(cards)
CC += DC
again = input("again : ")
if again == "no":
print("Ok")
if 21 < PC:
print("YOU LOSS")
break
elif PC > CC:
print("YOU WON")
break
else:
print("YOU LOSS")
break
elif 21 < PC:
print(nick, "LOSE")
break
问题在于 PC += DC 和 CC += DC