def name_to_number(name):
    """
    Converts a string called name to an integer. 
    Otherwise, it sends an error message letting you know that 
    an invalid choice was made.
    """
    if name == "rock":
        return 0
    elif name == "Spock":
        return 1
    elif name == "paper":
        return 2
    elif name == "lizard":
        return 3
    elif name == "scissors":
        return 4
    else:
        return "Not a valid choice"