Skip to content

Instantly share code, notes, and snippets.

@ricardosiri68
Last active December 17, 2015 19:29
Show Gist options
  • Save ricardosiri68/5660544 to your computer and use it in GitHub Desktop.
Save ricardosiri68/5660544 to your computer and use it in GitHub Desktop.
class Programador:
__brainState = False
def setBrainState(self,value):
if "si" == value:
self.__brainState = True
elif "no" == value:
self.__brainState = False
else:
print "el estado del cerebro que quiere establecer no es el correcto"
def getBrainState(self):
return self.__brainState
diego = Programador()
print "estado inicial del cerebro ","activado" if diego.getBrainState() else "desactivado"
diego.setBrainState(raw_input("desea activar el cerebro de diego? (si/no):"))
#------------------------------
print "estado final del cerebro","activado" if diego.getBrainState() else "desactivado"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment