IniziaInizia gratis

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.

Questo esercizio fa parte del corso

Introduction to Object-Oriented Programming in Python

Visualizza il corso

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Create an empty class Employee
____


# Create an object emp of class Employee 
____
Modifica ed esegui il codice