def punctuate_period_safe(string):
    """Add a period at the end of `string` if no sentence-final punctuation is
    there already.

    """

    if string[-1] in ['?', '.', '!']:
        return string
    else:
        return '%s.' % string