Created
May 6, 2013 00:51
-
-
Save ricardosiri68/5522765 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Persona: | |
def __init__(self,apellido,nombre,ocupacion,edad): | |
self.__apellido=apellido | |
self.__nombre=nombre | |
self.__ocupacion=ocupacion | |
self.__edad=edad | |
def setApellido(self,__apellido): | |
self.__apellido=__apellido | |
def getApellido(self): | |
return self.__apellido | |
def setNombre(self,__nombre): | |
self.__nombre=__nombre | |
def getNombre(self): | |
return self.__nombre | |
def setOcupacion(sefl,__ocupacion): | |
self.__ocupacion=__ocupacion | |
def getOcupacion(self): | |
return self.__ocupacion | |
def setEdad(self,__edad): | |
sefl.__edad=__edad | |
def getEdad(self): | |
return self.__edad | |
persona1=Persona("Perez","Juan","estudiante","20") | |
print persona1.getEdad() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment