I would use a dictionary here
First, initialize your dictionary with the relevant values.
Second, ask for the user input.
Last, get the value from the map with the user input as the key.
animals_map = {"dog" : 30, "cat" : 10, "frog" : 5}
animal = raw_input('>') #and a user inputs cat
animal_number = animals_map[animal]
print 10 + int(animal_number) #with the hope that will output 20
EDIT:
As Ev. Kounis mentioned at the comment you can use the get function so that you can get a default value when the user input is not in the dictionary.
animals_map.get(animal, 0) # default for zero whether the user input is not a key at the dictionary.