2017-03-11 52 views
-1

所以我基本上想要做一个coinflip脚本,它给了我在最后一次打印“无效语法”。你能帮我吗?Python coinflip无效语法打印帮助我请

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")) 

回答

1
if answer == (number 
       print("You won")) 

应该

if answer == number: 
    print("You won")