Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Oh I see, my code returns 25 :V yea my logic is wrong. Thank you very much for your help :)
That test is comparing the result of running your code to 26 and it is not so the test is failing. I suggest adding print statements to check what your code is returning.
[ C ]
Hi everyone,
My code fails in the following case:
"The expression (duplicate_count("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz")) == (26) is false."
I don't figure out why 26 is "false" since each letter is repeated from 'a' to 'z' and consists of 26 letters.
Help :V
Because of number of letters.
If you just sum ASCII numbers for each letter in a word "aa", you'll get "97 + 97" = "194", in the same time for word "w" you'll get "119", i.e. "194" > "119".
It's a wrong answer.
According to the task, you should consider letters position in the alphabet: a = 1, b = 2, c = 3 etc. : so you supposed to get for "aa" -> "1 + 1" ="2", and for "w" -> "23".
"23" > "2". The correct answer is "w".
The same doubt for me ...anyone explain this if you know the answer
oooh! I see :v
Thanks.
Read stephane777's post below, it's been explained several times before. Tests are ok. You're not following the instructions.
[ C ] Hi!
I can't figure out why "volcano" is higher score than "climbing".
I got the following result highestScoringWord("what time are we climbing up the volcano"); :
"volcano" scores = 754
"climbing" scores = 837
So "climbing" should be the highest scores but the test expected is "volcano".
Halp :v