p
y
c
h
a
l
l
e
n
g
e
r
Home
Intermediate Python
Classes and OOP I
Add Attributes to an Instance
Add Attributes to an Instance
Attach a
name
and an
age
attribute to an existing instance using dot notation.
Premium
reset
def greet(name): return f"Hello, {name}!" print(greet("Erik"))
Python
Setting up Python environment...
Output