所以我基本上就像一个硬币翻转脚本一样,它在最后一次打印时给了我“无效的语法”。你能帮我吗?
import random
print('Choose a number between 1 and 0')
answer=input()
number=random.choice('10')
random.choice('10')
print(random.choice('10'))
if answer == (number
print("You won"))
答案 0 :(得分:1)
if answer == (number
print("You won"))
应该是
if answer == number:
print("You won")