Activity 01
Pairs: Input Validation Coding
Pairs write Python functions to validate student data: check ID format, age range 13-18, and grade 0-100. Test with 10 sample inputs, log errors, then swap and critique partner's code. Discuss improvements.
How does data validation differ from data verification?
Facilitation TipFor the Input Validation Coding activity, circulate and ask pairs to explain their validation logic in plain language before they run tests, ensuring they connect code to business rules.
What to look forPresent students with a scenario: 'A user is entering student scores for a test where the maximum score is 100.' Ask them to write down two specific validation rules that should be applied to the 'Score' field and explain why each rule is important.