romerlrl

Untitled

Jun 24th, 2021 (edited)
334
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Online Python compiler (interpreter) to run Python online.
  2. # Write Python 3 code in this online editor and run it.
  3. from datetime import date
  4. from random import randint
  5.  
  6. def days_before_christmas():
  7.     t = date.today()
  8.     xmas = date(2021, 12, 25)
  9.     return xmas-t
  10.    
  11. def nd6(n):
  12.     stack = [randint(0, 5)+1 for x in range(n)]
  13.     return (sum(stack), stack)
  14.  
  15. print(days_before_christmas())
  16. print(nd6(8))    
  17.  
RAW Paste Data