Scripting Helpers is winding down operations and is now read-only. More info→
← Blog Home

Snack Break Problem # 11

Introduction

This week's snack break is to create your own chat filter! In the past few weeks, I've noticed people use alt codes to bypass the chat filter. Say "abc" was a profane word, if a person said: a_b_c (if _ was an alt code), it'd show up as 'abc'. The task is to print "Profanity detected" whenever it detects profanity, even if it's disguised!


Approach

Following on what was stated above, you need to be able to detect if someone uses profanity. Even if a person would say "a.b.c" (if abc was a profane word), your script would detect it, and print 'Profanity detected'. The profane word could be anywhere in the sentence, separated by any alt code, or non-letter. When doing the task, submit it so it detects actual profane words, rather than abc.

Best of luck!

Addition

We noticed many of you started to think Snack Breaks were boring you, so we added a reward! The first person who complete the highest challenge of any snack break, in the most efficient way, will receive a Snack Break badge on their SH account! The badge will be a light bulb,

SB Badge
, and it shows that you have the determination to complete any given task! Those who already completed one of my Snack Breaks will be receiving the badge!

I will be publishing the answer next week Monday, or possibly a bit earlier to bring a new Snack Break! Those who email me first with their answer will receive a shoutout on the next Snack Break related post I make!

Last Week's Snack Break

Last week's Snack Break seemed to have stumped everyone! View the solution here. ZarsBranchkin was the intelligent mind who completed last week's snack break!

Be sure to follow our twitter to stay up to date!

Commentary

Leave a Comment

ChemicalHex says: March 22, 2016
Determination.
Shawnyg says: March 23, 2016
Yep. Happy scripting.
Lualogy says: March 23, 2016
Does specific profanity sequences like "c_b_a" have to be detected?
XAXA says: March 23, 2016
please put up some test cases!
Validark says: March 25, 2016
I'm sitting this one out. Here's why: "Those who email me FIRST"