Created
November 19, 2016 05:15
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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