You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
328 B
14 lines
328 B
6 months ago
|
class Person(object):
|
||
|
|
||
|
# this is double underscores around init
|
||
|
def __init__(self, name, age, eyes):
|
||
|
self.name = name
|
||
|
self.age = age
|
||
|
self.eyes = eyes
|
||
|
|
||
|
def talk(self, words):
|
||
|
print(f"I am {self.name} and {words}")
|
||
|
|
||
|
becky = Person("Becky", 39, "green")
|
||
|
becky.talk("I am talking here!")
|