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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
too easy :clown:
This comment is hidden because it contains spoiler information about the solution
can someone explain this approach?
This comment is hidden because it contains spoiler information about the solution
Exactly what I did :D
Maybe to make sure the input is always a boolean
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
why?
should return 0?
Yeah, but the description clearly says "first character will be the desired answer" so while your approach is more correct (or best practice) and solves wider problem, the task itself was much simpler in this case.
bool
checks it first. If it's false, the second part of the expression (the one afterand
) is never evaluated.Closing as it's too late to make corresponding changes
Loading more items...