Created
December 27, 2011 23:19
-
-
Save Chavao/1525452 to your computer and use it in GitHub Desktop.
Ensinando programação para minha irmã com entrada e saída de informação através de um robozinho.
This file contains hidden or 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
# -*- encoding: utf-8 -*- | |
class Robo: | |
def perguntar_filme(self): | |
self.filme = raw_input("Qual seu filme favorito? \n") | |
def comentar_sobre_o_filme(self): | |
print 'Caramba, esse filme ' + str(self.filme) + ' também é meu favorito!' | |
def perguntar_sobre_comida(self): | |
self.comida = raw_input("Qual sua comida favorita? \n") | |
def comentar_sobre_a_comida(self): | |
print 'Eu tambem me amarro em ' + str(self.comida) | |
psycho = Robo() | |
psycho.perguntar_filme() | |
psycho.comentar_sobre_o_filme() | |
psycho.perguntar_sobre_comida() | |
psycho.comentar_sobre_a_comida() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment