Profane Filter Assignment: Profanity Detection, Analysis and Filtering

Verified

Added on  2019/09/16

|1
|127
|90
Homework Assignment
AI Summary
This assignment involves creating a program that detects and filters profane words from a given input string. The program should read a string from the keyboard and check if it contains any of the predefined profane words (e.g., "brown", "black", "white"), ignoring case sensitivity. The program should reject lines that contain a profane word exactly. The program should not reject lines that contain profane words as part of another word (e.g., "Whiteman" or "Brownbag"). The assignment requires the creation of a list of 12 profane words. This solution provides a comprehensive guide to help students understand and solve this assignment effectively, with the help of Desklib's AI-based tools.
Document Page
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" to be 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, Whiteman or Brownbag should not be considered profane.
List of Profane words:
Create a list of 12 profane words
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser