3
def clinic():
print "Voce acabou de entrar na clinica!"
print "Voce entra pela porta a esquerda (left) ou a direita (right)?"
answer = raw_input("Digite left (esquerda) ou right (direita) e pressione 'Enter'.").lower()
if answer == "left" or answer == "l":
print "Esta e a sala de Abuso Verbal, seu monte de caca de papagaio!"
elif answer == "right" or answer == "r":
print "E claro que esta e a Sala das Discussoes. Eu ja disse isso!"
else:
print "Voce nao escolheu esquerda ou direita. Tente de novo."
clinic()
clinic()
What is the need for these two clinic()
in the end? Only 1 of them would apparently work the code.
It wasn’t me who wrote the code, it was from a course I’m taking.
Can you confirm the code’s indentation? I tried to fix it, but I need you to confirm that I did it right (without the correct indentation, we have no way to evaluate it correctly).
– Woss
If the above code is correctly indented the last Clinic() calls the method for the first time.
– William Pereira
In time: use Python3 instead of python 2.7 - then you can tell your story with accents, without having to worry about syntax errors.
– jsbueno