def check(result, response):
    """
    Returns a string of correct, incorrect, or invalid
    after comparing the conversion result and response of
    the student rounded to the ones place.
    """
    try:
        if result is None:
            return "invalid"
        elif response is not None:
            return "correct" if int(response) == int(result) else "incorrect"
        return result
    except ValueError:
        return "incorrect"