+ 7

Challenge: bad words dimmer 🙊🙊🙊⛔⛔⛔

Are you able to write a program that replace all bad words in a string (inserted by a user) with some characters like "@$*!#" but randomly chosen? List of bad words : "hi, how, you, hello, red, chocolate, tree, sea, sun, java" 😝😂 and other if you want. If "hi" is a curse word also "Hi", "HI" and "hI" are bad. Example: "Hi, how are you?" >> "@$, **@ are #$#?"

29th Sep 2017, 2:58 PM
Andrea Simone Costa
Andrea Simone Costa - avatar
15 Respuestas
+ 13
https://code.sololearn.com/cGt6Olt1iqf4/?ref=app
29th Sep 2017, 3:47 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
29th Sep 2017, 3:48 PM
Kartikey Sahu
Kartikey Sahu - avatar
1st Oct 2017, 10:03 PM
David Akhihiero
David Akhihiero - avatar
+ 5
Thanks @Leo from everyone
29th Sep 2017, 4:33 PM
Kartikey Sahu
Kartikey Sahu - avatar
+ 5
A very <s>simple</s> buggy approach in Ruby: --> https://code.sololearn.com/cBYENKGA1dBd/ Very funny &%$#% challenge!
30th Sep 2017, 7:24 AM
noobcøder
noobcøder - avatar
29th Sep 2017, 6:44 PM
VcC
VcC - avatar
30th Sep 2017, 2:37 AM
ysraelcon
ysraelcon - avatar
+ 1
@maz I got some problems with your code
29th Sep 2017, 4:54 PM
Andrea Simone Costa
Andrea Simone Costa - avatar
+ 1
@joshi ehm...what?
30th Sep 2017, 2:12 PM
Andrea Simone Costa
Andrea Simone Costa - avatar
+ 1
@Andrea lol...my bad. Should have posted in a different thread.
30th Sep 2017, 2:14 PM
sankarshan a joshi
sankarshan a joshi - avatar
+ 1
good old c++ code... https://code.sololearn.com/cSztuQv6PVnY/#cpp Edit: Just realized (again..in my life) that I'm absent minded. Will post the proper code soon enough (If... I remember that XD )
30th Sep 2017, 2:17 PM
sankarshan a joshi
sankarshan a joshi - avatar
0
if(n1.value != "" && n2.value != "") what does this means??
30th Sep 2017, 10:09 AM
Aman Verma
Aman Verma - avatar
20th Dec 2018, 11:12 AM
Xoliyorov Xolbek
Xoliyorov Xolbek - avatar
- 1
هلا
2nd Oct 2017, 6:11 PM
Ahmed Alhcemu
Ahmed Alhcemu - avatar