2017-03-11 74 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")