10/15. Censor Program: Where did this program go wrong?


#1

def censor (t,w):
l=len (w)
flag=0
for i in t:
if i==w:
for j in range(0,l):
if i+j==w+j:
flag=1
else:
flag=0
if flag==1:
for m in range(0,l):
i+m=="*"
return t


#2

Can you enclose your code in triple backticks so others can see your indentation?

```
(^ Those are backticks.)
Put three backticks.
Then your code.
Then three more backticks after your code.

Also, you should remove the space in len (w) before the opening parenthesis.


#3

Here's what worked for me: