12 lines
272 B
Python
12 lines
272 B
Python
import random
|
|
import time
|
|
|
|
# Random number generator that's biased towards 0
|
|
def biased_random(max_value, strength=3):
|
|
return round((random.random() ** strength) * max_value)
|
|
def sleep(wpm):
|
|
sleep_time = (1/(wpm/60))-1
|
|
if sleep_time > 0.0:
|
|
time.sleep(sleep_time)
|
|
|