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.
I know right. Good one indeed. A lesson at a time
I this the code is the most efficient and specific to the problem. It is a good thing
it's out of brain
crucial to ensure that such conciseness does not come at the expense of code readability.
😎it`s me
Python coerces any non-zero value to
True
in logical expressionsPlease add the
Spoiler
flag when posting solutions. I added it for you here.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
How? It reads "Return the string 'Odd' if the number is odd or else return the string 'Even'. Almost can't get more readable than that.
"This solution is clever and taught me a lot, but I think it's too specific. It could be hard to adapt if the logic needed to change later on. While that's not the focus of these exercises, it's definitely something to consider for anyone in awe of this solution (myself included)."
This is poor self documenting code because it's not simple to read.
Oh thanks bro I think I got it.It's my logical error in that condition.
Can anyone explain that?It would be wrong logical output (because when if condition is true output should be 'even')though the output would be wrong there's the not completed condition (due to condition have to check the result of that math operation whether equalt to zero)is there any grammatical errors on this comment please refuse all of these.
and here I assumed I couldn't just sort a string...
Loading more items...