Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. # memes will be numbers in this case
  2. from random import randint
  3. from time import sleep
  4.  
  5. # set x to "null" so it is defined in memory
  6. x = "null"
  7.  
  8. while True:
  9.     # create a temporary value (meme)
  10.     temp = randint(0,10)
  11.     # check if x is already this value (no change in top meme)
  12.     # if it's NOT, then we assign x as this value
  13.     if temp != x:
  14.         x = temp
  15.         print("x assigned to %s" % (x))
  16.     # then we sleep until loop restarts
  17.     sleep(1800
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement