1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Object-Oriented Programming in Python

Connected

Exercise

Create your first class

Time to write your first class!

In this exercise, you'll start building the Employee class, beginning by defining it as an empty class, and then adding a method allowing you to set an object's .name attribute.

Instructions 1/2

undefined XP
    1
    2
  • Create an empty class Employee.
  • Create an object emp of the class Employee by calling Employee().