def name_to_number(name):
    """
    Helper function that converts the string "name" into 
    a "number" between "0" and "4" in the way described below. 
        
    0 - rock
    1 - Spock
    2 - paper
    3 - lizard
    4 - scissors		
    """
       
    # Define a variable that will hold the computed "number"
    # and initialise it. Normally, after the execution of this
    # function, "number" should have one of the following 
    # values: 0,1,2,3,4 depending on player's choice, or "-1" 
    # case of an invalid input.    
    number = -1
    
    # A sequence of "if/elif/else" clauses should be used
    # checking for conditions of the form 
    # name == '<player_choice>' to distinguish the cases. 
    # A final "else" clause catches cases when "name" 
    # does not match any of the five correct input strings.     
    if ( name == 'rock' ):
        number = 0
    elif ( name == 'Spock' ):
        number = 1
    elif ( name == 'paper' ):
        number = 2
    elif ( name == 'lizard' ):
        number = 3
    elif ( name == 'scissors' ):
        number = 4
    else:
        number = -1        
        
    # Return the computed "number".
    return number