dictanimal = {'cats' : ["Tiger","Lion"], 'horses' : ["Zebra","Horse","Lamb"],
'birds' : ["Raven","Parrot","Dove"], 'elephants' : ["Elephant"], 'dogs' : ["Wolf","Hyena"]}
d = random.choice(list(dictanimal.keys()))
rand = random.choice(dictanimal[d])
print("animal:", rand)
classofanimal = input("What class does this animal belong to?:")
if classofanimal in list(dictanimal.keys()) and rand in dictanimal[classofanimal]:
#code