from Persona import Persona class Profesor(Persona): def __init__(self, nombre, apellidos, edad, identificador): """Constructor de la clase""" Persona.__init__(self, nombre, apellidos, edad) self.Identificador = identificador def __str__(self): return ( "Nombre del profesor: " + self.nombre() + " " + self.apellidos() + " identificador: " + self.identificador() ) def visualiza(self): """Visualiza su valor""" print(self) def identificador(self): """retorna el nombre""" return self.Identificador """ Prueba de las clases """ if __name__ == "__main__": a = Profesor("Antonio", "Carrillo", 50, "Prof 3289239823") a.visualiza()