Learn
A class is a template for a data type. It describes the kinds of information that class will hold and how a programmer will interact with that data. Define a class using the class
keyword. PEP 8 Style Guide for Python Code recommends capitalizing the names of classes to make them easier to identify.
class CoolClass: pass
In the above example we created a class and named it CoolClass
. We used the pass
keyword in Python to indicate that the body of the class was intentionally left blank so we don’t cause an IndentationError
. We’ll learn about all the things we can put in the body of a class in the next few exercises.
Instructions
1.
Define an empty class called Facade
. We’ll chip away at it soon!
Sign up to start coding
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.