curriculum/challenges/english/blocks/workshop-salary-tracker/68c18b1d0fce081f85312d97.md
In a previous lesson, you learned that an attribute prefixed with a single underscore is meant for internal use by convention.
Modify both name and level attributes into _name and _level, since these are not supposed to be modified from outside their class.
Note that this does not prevent the attribute from being accessed or modified outside the class. Also, in Python there's always a way to access private attributes (prefixed with a double underscore) as well.
Your __init__ method should set self._name to name.
({ test: () => assert(runPython(`_Node(_code).find_class("Employee").find_function("__init__").has_stmt("self._name = name")`)) })
Your __init__ method should set self._level to level.
({ test: () => assert(runPython(`_Node(_code).find_class("Employee").find_function("__init__").has_stmt("self._level = level")`)) })
--fcc-editable-region--
class Employee:
def __init__(self, name, level):
self.name = name
self.level = level
charlie_brown = Employee('Charlie Brown', 'trainee')
--fcc-editable-region--