Python - Fr : Typo Error


#1


Hello, it seems there is a little typo error in the introduction of this chapter.
Indeed, in the last condition, the function clinic() is called, instead it should be clinique() (which is clinic() in french)

https://www.codecademy.com/fr/courses/python-beginner-fr-FR-a2dkr/0/1?curriculum_id=5370f030fed2a866a2000001

Traceback (most recent call last):
File "python", line 13, in
File "python", line 11, in clinique
NameError: global name 'clinic' is not defined

The clinique() function should be called instead.

def clinique():
    print "Vous entrez dans la clinique !"
    print "Voulez-vous prendre la porte de droite ou de gauche ?"
    reponse = raw_input("Tapez 'droite' ou 'gauche' puis validez avec 'Entree'.").lower()
    if reponse == "gauche" or reponse == "g":
        print "Vous etes dans la salle d'attente."
    elif reponse == "droite" or reponse == "d":
        print "Vous etes dans la salle d'operation. Sortez vite !"
    else:
        print "Vous n'avez choisi ni la droite ni la gauche, essayez encore !"
        clinique()

clinique()

#2

Being an old track course there is not much chance this will get edited. Fortunately for us it does not impede the learner. It does jump out from the page, though, being so obvious. It will raise an exception if that branch is followed by the program.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.