Skip to content

Instantly share code, notes, and snippets.

@bitofeverything
Created November 19, 2016 05:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bitofeverything/76616810aaf5d2ef4681b673a52fc0d4 to your computer and use it in GitHub Desktop.
Save bitofeverything/76616810aaf5d2ef4681b673a52fc0d4 to your computer and use it in GitHub Desktop.
Simple script to give timed constrained prompts to draw something. Bring your own dictionary.
from time import sleep
from random import sample, shuffle
list = open("dictionary.txt").read().splitlines()
shuffle(list)
inputcount=input("How many words? ")
inputduration=0
while(inputduration < 3):
inputduration=input("How many seconds (minimum 3)? ")
sublist = sample(list,inputcount)
for word in sublist:
print("Draw the following in %d seconds" %inputduration)
print(word)
sleep(inputduration-3)
print("... 3")
sleep(1)
print("... 2")
sleep(1)
print("... 1")
sleep(1)
print ("All done, thanks for playing")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment