Activity 01
Pair Programming: Password Parser
Pairs write a program that slices a user input string to extract username and domain from an email address, then uses methods to check length and uppercase the username. Partners alternate coding and testing with sample inputs. End with pairs sharing one edge case they handled.
Analyze how string methods can efficiently process and transform text data.
Facilitation TipDuring Pair Programming: Password Parser, circulate to ask pairs to explain their choice of slicing over find() and how immutability affects their password validation logic.
What to look forProvide students with a sample log file snippet (as a string). Ask them to write a short Python code snippet that uses string slicing and the `find()` method to extract all IP addresses from the snippet. Review their code for correct syntax and logic.