8/15 : anti vowel


Hi guys,
I need some help here.
After trying different possibilities and reading some posts, I came up with this code :slight_smile:

def anti_voyelle(texte):
for lettre in "aeiouAEIOU":
texte = texte.replace(lettre, "")
return texte
print anti_voyelle("bonjour")


The output seems correct but I get this error message ""'str' object is not callable".

Help please

Replace this line with your code.


I tried this too and I get the same error message above :

def anti_voyelle(texte):
    vowels = ["A", "a", "E", "e", "I", "i", "O", "o", "U", "u"]
    anti = []

    for i in texte:
        if i not in vowels:
    return "".join(anti)
print anti_voyelle("bonjour")


Could be an SCT issue. Inviting a couple of members who are adept at finding the issue. They might be able to offer a work around.


The exercises aren't locked though, just go to the next one after having controlled yourself that your function is behaving as it should by testing it a few times.

but sure, it can be made to crash by adding

chr = None

at the top level of the file (outside your function, such as at the very top or bottom of the code)


In the early days all of the foreign language lessons worked and I had no problem passing everything. It didn't become an issue until last year some time. That's when these work arounds started to surface. Something got changed at some point 1-2 years ago.


They translated my bugfixes, adding new bugs in the process. Not sure why they bothered or why they also decided that the code should be translated as opposed to just the strings.

Having anything in non-English is surely only so that they can say that they do, it's not something they are able to support.

I think people are better off just learning English? If they haven't gotten around to that in school yet then they would probably need personal tutoring for programming anyway


Thank u all for your answers. It just worked a couple of hours later.
Sorry for my late reply


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