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.
Agree: why is it declared Clever why it doesn't solve the problem
This comment is hidden because it contains spoiler information about the solution
Yes, Thanks !
Your function should return the first non-repeated char of the string, so, if the string has only 1 char, it should return that one. It's not repeated, is it? At least I think that's the way of understanding it.
Looks at the minimal test suite (in Python) :
test.assert_equals(first_non_repeating_letter('a'), 'a')
I may have misunderstood the point, so I've added a specific check on len(s) == 1 => return s
What are you saying there?
'a'
is not repeated, so, yes,dups('a') => ''
of course.If a string contains all repeating characters, it should return an empty string ("");
dups('a') => '' and not 'a'
I don't understand why the "isdigit()" test work in your context.
Using Python 3.12 on my own computer:
a = "098"
b = "98"
print(a.isdigit()) => True => Here we want to reject it in the exercice
print(b.isdigit()) => True
What did I miss ? :/
EDIT : OK, I wasn't looking at the right part of the evaluation, it's "str(int(o))==o" who do the job :)
AHAHAHA !!
I disagree, this is against the main objective of this platform, which is to learn how to implement stuff.
What do we learn from this solution ? Nothing.
:D
This is smart move to consider the total sum of elements, but what if we have different numbers and their multiplicity while the sum is the same ? Is it possible ?
Ok, I just learned items of a list don't need to be ordered the same way to make an evaluation between 2 arrays.
(This will be invalid in PHP)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...