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.
yes
This would never have occured to me, nice!
Smarty pants :)
Oh I should have thought of this.
My inner math teacher is screaming.
Well played.
I see stuff like this and think that maybe this is not for me :*)
When people that think like this exist, what can the rest of us offer :*)
DRY. Could set n = len(names) at the start :)
This is the first time my code resembles anything like the best code here :D
What are the [] for inside the ()? It works without, just wondering the logic :)
This comment is hidden because it contains spoiler information about the solution
Smort!
I hope that if I keep trying, problems like this will be easier.. right? :*)
The sum function adds all of the elements in the list.
The input list is a list of 1's for every letter in the sentece if that letter is a vowel.
Therefore we sum all of those 1's together to get the number of vowels.
For example is inputStr is "abcdeabcde", then the list input into the sum function would be
[1, 1,1, 1]
So by summing it up we get sum([1,1,1,1]) = 1+1+1+1 = 4 vowels.
Wish I could get the hang of this optimised coding :)
This comment is hidden because it contains spoiler information about the solution
Loading more items...