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.
The reason why you should never do
str == str
in solutions is:The answer:
Phone => 1-908-512-2222, Name => Peter O'Brien, Address => High Street CC-47209
My answer:
Phone => 1-908-512-2222, Name => Peter O'Brien, Address => High Street CC-47209
The difference is one space. Stop comparing
str == str
in solutions where there is no reason for it.This kata could have it's solutions as a
dict
which is not just more readable but this is what we would do in real life:There is no reason here for using strings like this.
Still not working since '2' and '8' is 3 so the solution is 45 not 47.
It is not an issue.
The MORSE_CODE "code table" contains a key for '...---...' which has a value of 'SOS'.
Just an advice ...
Using a loop for creating abc is unnecessary, use
ord()
andchr()
next time.PHP translation added.
Same with me.