def duplicate(string, times):
    """Returns a string that is the concatenation of the given string repeated the
    given number of times."""
    result = ""
    for dummy in range(0, times):
        result += string
    return result