The assignment is to create a program that filters out profanity from user input on an online bulletin board. The program should read a string from the keyboard, test whether it contains one of 12 predefined profane words (case-insensitive), and reject only lines that contain exact matches of these profane words.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
Profane Filter Suppose that we are working for an online service that provides a bulletin board for its users. We would like to give our users the option of filtering out profanity. Suppose that we consider the words"brown" "black" "white"tobe profane. Write a program that reads a string from the keyboard and tests whether the string contains one of our profane words. Your program should find words like"WHite"that differ only in case. Have your program reject only lines that contain a profane word exactly. For example,Whitemanor Brownbagshould not be considered profane. List of Profane words: Create a list of 12 profane words