SHARE
TWEET

GCK/Coin_flip function

GCK Sep 17th, 2019 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def coin_flip():
  2.     #heads =0 and tails =1
  3.     generated=random.randint(0,2)
  4.     print("heads or tails?")
  5.     if generated==0:
  6.         print("heads")
  7.     elif generated==1:
  8.         print("tails")
  9.  
  10.  
  11. coin_flip()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top