I've gotten something that, as I run through it line by line, should work. However, I keep getting two error messages. In the console, I see:
File "python", line 7
SyntaxError: invalid syntax
Meanwhile, in the editor, I see this:
Oops, try again. Did you create a function called censor? Your code threw a "global name 'censor' is not defined" error.
def censor(text, word): words_arr = text.split() final = '' for check_word in words_arr: if(check_word == word): final.join(" " + "*" * (len(check_word)) else: final.join(check_word) return final censor("I like apples and oranges and bananas", "and")
Admittedly, there's a pretty good chance that this is just my bonehead forgetting something simple about conditionals, but can someone please help me because I can't figure out for the life of me what it is.