Activity 01
Pair Programming: Animal Classifier
Pairs write a program using nested if statements to classify animals by habitat (land, water) then diet (carnivore, herbivore). Test with 10 sample animals and adjust for edge cases like flying mammals. Share one successful classification chain with the class.
Evaluate the effectiveness of nested conditions in managing multiple criteria.
Facilitation TipDuring Pair Programming: Animal Classifier, sit with each pair and ask them to verbalize the condition they are evaluating before typing, ensuring intentional nesting.
What to look forProvide students with a simple flowchart or pseudocode snippet containing nested 'if' statements. Ask them to write down the final output for a given input scenario and explain their reasoning in one sentence.