Advertisement
rickzman

Untitled

Dec 7th, 2019
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. # Coin flip
  2.  
  3. from random import randint
  4.  
  5. def flip():
  6. global coin_flip
  7. coin_flip = randint(1,2)
  8. return
  9.  
  10. flip()
  11.  
  12. if coin_flip == 1:
  13. coin= "head"
  14. else:
  15. coin = "tails"
  16.  
  17. print(coin)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement