DecompositionSprint 4β successCompiled Learning ObjectivesWhy we use typesExplain how type annotations help understand a function’s expectations.Explain how type annotations help prevent bugs.Type checking with mypyRun mypy to detect type errors in Python.Annotate function signatures with types in Python.Classes and objectsDescribe the purpose of a class.Explain the relationship between a class and instances of that class.Use classes in mypy.MethodsDefine a method.Define a free function.Explain why methods can be more useful than free functions.Implement a method on a class.DataclassesDefine a value type.Use @dataclass in Python to make a value type.Customise a @dataclass in Python with extra methods.GenericsDefine a generic type.Explain why generics are useful.Use a generic in a type annotation.Type-guided refactoringsExplain how type annotations and type checking can guide refactorings.Use mypy to guide a refactoring.EnumsIdentify risks of using strings to represent data.Define an enum.Explain how an enum addresses the risks of using strings to represent data.Write code which checks string validity once, and then uses type-checking to avoid further validity checks.InheritanceDefine inheritance.Write a class which extends another class.Explain which method will get called when a subclass overrides some methods in superclass.Explain the difference between inheritance and composition.Technical interview workshopPerform a technical interview.Explain what you’re thinking when solving a problem.Write code in front of someone in an interview setting.