I'm trying to implement a 60 second timer for a boggle game, in which when the timer hits 0, the user cannot enter any more words. Right now I'm using a counter to limit the amount of words entered (which is set to twenty), I want to change this to a timer of 60 seconds, but I'm not quite sure how. Thanks in advance!
x = 20
while x > 0:
print ""
EnterWord = raw_input("Enter word here: ")
print EnterWord
x = x - 1
if x == 0:
print "20 chances have been used."
If you want a timer, use
time()
: