Exercises 9: Patterns