12. Patterns, functions & algebra