Not-so daily coding challenge 2 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

Not-so daily coding challenge 2

Make a simple code that converts a text entered by the user into leetspeak. I you are unfamiliar with leetspeak, ask wikipedia. Each letter should have a replacement. When you did this, post the code here, also tell me if future challenges should be harder or easier.

17th Apr 2017, 5:13 PM
Supersebi3
Supersebi3 - avatar
14 Answers
+ 20
@Valdemar but jff it's perfect. +I just tested console input: 4-5 rows.
17th Apr 2017, 9:15 PM
Illusive Man
Illusive Man - avatar
+ 19
@Supersebi3 gimme couple minutes to finish my art and I'll do that @Tobi link plz
17th Apr 2017, 7:01 PM
Illusive Man
Illusive Man - avatar
+ 19
it's not bad but easier than others
17th Apr 2017, 7:19 PM
Illusive Man
Illusive Man - avatar
+ 18
@Supersebi3 Not that long to do. Finishing art took more time)) https://code.sololearn.com/cVxa8aaP17pZ/?ref=app
17th Apr 2017, 8:24 PM
Illusive Man
Illusive Man - avatar
+ 18
17th Apr 2017, 8:48 PM
Illusive Man
Illusive Man - avatar
+ 12
@Supersebi What are ou trying to do? 😂😂😂😂😂😂
17th Apr 2017, 6:48 PM
Gami
Gami - avatar
+ 6
@Squidy I said every letter should have a replacement... this is also pretty long, try to make it as compact as you can
17th Apr 2017, 5:44 PM
Supersebi3
Supersebi3 - avatar
+ 6
This is probably a bad challenge, im sorry for that. the thing is, the last challenge seemed to be a bit too hard so I tried to do something easier, but this is just bad. next will hopefully be better...
17th Apr 2017, 7:18 PM
Supersebi3
Supersebi3 - avatar
+ 5
@Tobi if ill make it tomorrow...
17th Apr 2017, 7:48 PM
Supersebi3
Supersebi3 - avatar
+ 4
@Tobi too hard for me sorry
17th Apr 2017, 7:26 PM
Supersebi3
Supersebi3 - avatar
+ 2
Normally I wouldn't do these, but I'm SUPPOSED to be studying for exams, so... std::string toL337(std::string input) { for (size_t i = 0; i < input.size(); ++i) { switch (tolower(input[i])) { case 'a': input[i] = '4'; break; case 'e': input[i] = '3'; break; case 'i': input[i] = '1'; break; case 'o': input[i] = '0'; break; case 's': input[i] = '5'; break; case 't': input[i] = '7'; break; } } return input; } And yes, they should be a lot harder. Edit: I was going by "basic leet" as defined here: http://www.robertecker.com/hp/research/leet-converter.php Every letter? That's not challenging; that's just tedious. I'll leave it to the next person with more patience than me. ;_;
17th Apr 2017, 5:46 PM
Squidy
Squidy - avatar
+ 2
Make it more difficult please. I'm also not going to implement a solution, though. But if you need a little productive procrastination, consider doing my Easter challenge. Should be simple enough, although future incarnations will become significantly harder. Given that I get at least some people here interested.
17th Apr 2017, 6:49 PM
Tob
Tob - avatar
+ 1
@Supersebi: I'll look into your other challenge tomorrow, if I can find it. @Illusive Man: Part 2 is here: https://www.sololearn.com/Discuss/324478
17th Apr 2017, 7:47 PM
Tob
Tob - avatar
+ 1
Replace scans through all symbols in the string and looks for characters to replace. You are scanning the whole string more than 20 times, so if you would want to 1337-ify some long text, like a book, this would not be a best solution ☺️
17th Apr 2017, 9:01 PM
Valdemar
Valdemar - avatar