This is the code and notes from my live Twitch programming and drawing classes.
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.
|
def Person_new(name, age, eyes):
|
|
person = {
|
|
"name": name,
|
|
"age": age,
|
|
"eyes": eyes,
|
|
}
|
|
|
|
def talk(words):
|
|
print(f"I am {person['name']} and {words}")
|
|
|
|
person['talk'] = talk
|
|
|
|
return person
|
|
|
|
becky = Person_new("Becky", 39, "green")
|
|
|
|
becky['talk']("I am talking here!")
|
|
|