I'm trying to write a program which asks for the number of animals and then the name and the population of each animal. I want to get it to add the population of each animal but I having trouble getting the variables from the dictionary and adding them.

This is what I have so far.

x=input("How many animals?")
while loop!=x:
    animal=raw_input("What is the animal called?")
    popul=input("what is the population?")
print "the total number of animals is"

print "the total number of animals is", sum(animals.values())