Les fonctions - Jonction de fonction


#1

Bonjour ! malgré un code qui je pense est juste et des "Oeufs!" qui s'affiche correctement, j'ai ce message d'erreur qui refuse de me laisser en paix :stuck_out_tongue: !!!

Qui serais disponible pour m'aider ? voici le code entré :

def dire_oeufs_to_the_console():
""" Prints "Oeufs! to the console." """
print "Oeufs!"

Définissez la fonction pondre au dessus

de ce commentaire.

pondre()

La console affiche bien "Oeufs!" mais j'ai toujours le message d'erreur. J'ai tout essayer sans succés !!

Merci :slightly_smiling:

Hello ! despite a code which I think is fair and "Eggs!" which displays correctly, I have this error message that refuses to leave me alone: p !!!

Which would be available to help me? Here the code entered:

dire_oeufs_to_the_console def ():
""" "Prints" Oeufs! to the console." """
print "Oeufs!"

Set the function lay above

The comment.

pondre()

The console displays good "Eggs!" but I still have the error message. I try everything without success !!

Thank you :slightly_smiling:


#2

Hi,

You should give your function a name :grin:

Give the function the name you are calling at the end -> def pondre():

def pondre():
    """ "Prints" Oeufs! to the console." """
    print "Oeufs!"
    #Set the function lay above
    #The comment.
pondre()

#3

Hi :slightly_smiling: ,

Thank you for the reply ... but I did not understand everything .

I have to change the
def oeufs_to_the_console ()
in
def pondre ()

that's it ?
because that does not work either ... ^^


#4

Did you try this code:

def pondre():
    """ "Prints" Oeufs! to the console." """
    print "Oeufs!"
    #Set the function lay above
    #The comment.
pondre()

Because in your code it looked like the print wasn't indented under the function.


#5

yes my code is indented


#6

Look it worked for me (on the English site)

The only difference is, that I used "Eggs!" instead of "Ouefs!", because that's what the instructions want


#7

thank you ... I managed it was of maize put quotation marks and a space forgotten