📅  最后修改于: 2022-03-11 14:46:14.693000             🧑  作者: Mango
from random import random
def heads_or_tails():
guess = input('Pick heads or tails and then press eneter to play: ')
if random() > 0.5:
return 'tails'
else:
return 'heads'
print(heads_or_tails() + ' wins' + '!')