Sleeper

Taking time.sleep() to the next level.

ZzzzzZzZZzz...


# Python 2.7.7 Code
# Jonathan Frech, 26th of November, 2015

# import modules
import time, random

# loop
while True:
	# snore
	z = ""
	for _ in range(3, 15):
		z += ["z", "Z"][random.randint(0, 1)]
	print z + "..."
	
	# sleep
	time.sleep(random.randint(1, 4))
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s