import random


def time_to_write(words, wpm):
    """
        Takes a number of words and an average wpm, and returns a possible number of seconds required to write that
        many words.
    :param words: Number of words
    :param wpm: Average words per minute
    :return: Time to write words
    """
    time = words / wpm
    return int(time + random.randint(-2 * time * 30, 2 * time * 30))