ask "Does it eat plants?" and save the answer as plants
ask "Does it eat animals?" and save the answer as animals
if plants = yes and animals = yes then
say "Omnivore!"
add 1 to the omnivore tally
else if plants = yes then
say "Herbivore!"
add 1 to the herbivore tally
else if animals = yes then
say "Carnivore!"
add 1 to the carnivore tally
A sorting program with two kinds of output: a message and a tally chart.