Explanation:
Execution step:
1. Starting the program
2. It will get the animal name
3. Check whether the animal eats only plants. Then it prints "Herbivore". If the condition is false, it prints "carnivore".
4. Stop the program
To identify input, output and decision:
Start and Stop (oval): These are neither input nor output
Does it eat only plants?: Decision making statement ("d")
Read the names of the animals(Parallelogram): Input ("i")
Print Herbivore, Print Carnivore: Output "o"
Scenario 1: Input is lion
1. Start
2. Reads the input as "lion"
3. Check if lion eats only plants. So here it is false
4. Print "Carnivore"
5. Stop
Scenario 1: Input is Elephant
1. Start
2. Reads the input as "Elephant"
3. Check if lion eats only plants. So here it is true
4. Print "Herbivore"
5. Stop