📜  python 硬币翻转 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:14.306000             🧑  作者: Mango

代码示例3
# Import the RANDOM library.
import random as RANDOM # the 'as RANDOM' part could be optionial, 
# it's just choosing a name for the import.

def flip():
  flipped = RANDOM.choice('Heads','Tails')
  print(f'You flipped {flipped}')