human
I am working on the file "CuadernosPython/2._estructuras.ipynb".
The first task is:
Clases
Can you write Python program for it?
 Write me a the Python program you requested?
assistant
#Here is the Python program you requested.

class Person:
    def __init__(self, first, last):
        self.first = first # campos
        self.last = last       
    def greet(self, add_msg = ""): # mas metodos
        print('hello ' + self.first + ' ' + add_msg)

juan = Person('juan', 'dominguez')

type(juan)

juan.first

juan.last

pedro = Person('pedro', 'gonzalez')

pedro.first

pedro.last

pedro.greet('my friend')

pedro.greet()