Coding Challenge For Fun - Programming (2) - Nairaland
Nairaland Forum › Science/Technology › Programming › Coding Challenge For Fun (5190 Views)
| Re: Coding Challenge For Fun by efosky1246(m): 10:20am On Oct 14, 2017 |
young02:Bro this might work but it's quite inefficient.why looping thrice... |
| Re: Coding Challenge For Fun by young02(m): 5:49pm On Oct 15, 2017 |
efosky1246:quite inefficient... see as u talk am self... No be for FUN? tsk... If point-and-kill is what u prefer, have it! def counter(word): word = list(word.lower()) for i in word: if (i.isalpha()) or (i.isdigit()): count = word.count(i) if (count > 1): print "{} ={}" %(i,count) while(word.count(i) > 1): word.remove(i) that's all.... code attached... |
| Re: Coding Challenge For Fun by timtoday: 5:42am On Oct 16, 2017 |
edicied:Better than the previous java solution, but if all the character is not in the same case, your solution would fail for entry with same character but different cases I.e lower and upper cases which are supposed to count as same. |
A 30 Day Coding Challenge (Python) For BEGINNERS • Monthly Coding Challenge For Developers With Reward January Edition • Monthly Coding Challenge For Developers With Reward • 2 • 3 • 4
Please Can Someone Recommend To Me A Low Budget Laptop For Coding • NGR, Nigeria First Made Programming Language • Where Can A Computer Student Can Do Siwes For Free In Lagos
)