Activity 01
Pair Programming: Grade Calculator
Pairs code an if-elif-else chain to assign grades (A to F) based on marks out of 100. Add a nested if for special remarks if marks exceed 90 and attendance is above 90 percent. Test with 10 inputs each and swap to review partner's code.
Compare the use of multiple if statements versus an if-elif-else structure.
Facilitation TipDuring Pair Programming, ask students to verbally explain each condition’s role before typing to ensure both partners understand the logic flow.
What to look forProvide students with a Python code snippet containing an if-elif-else structure and a set of inputs. Ask them to write down the final output of the code for each input and briefly explain why.