Hi, you haven't provided the programing language in which you need the code, I'll just explain how to do it using Python, and you can apply the same method for any programming language, pseudocode or flowchart.
Answer:
1 userInput = input("Please enter 'userInput':\n")
2 if "darn" in userInput.lower():
3 print("Censored")
4 else:
5 print(userInput\n)
Explanation line by line: