Last active
December 17, 2015 19:29
-
-
Save ricardosiri68/5660544 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 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