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.
Note: encoding can be done with
Why the random choice of 3 methods performing globally the same task (although
eval
is not recommended as usual)?Hard-coded lambda expression with succession of conditional expressions? Not exactly easy to read
Hi, not that
dir
is actually a Python keyword :)Note that this code would run infinitely for negative numbers ;)
But I guess this was on purpose ^_^
In C#, the name of argument is
n
for an array of integers: is misleading. Consider usingnumbers
or similar name instead.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Nice Solution.
TIP: you can simplify
True if <condition> else False
by just<condition>
!This assumes that the triangle is isoceles, which might not be the case.
All tests are but maybe we could have a triange like:
Which would result in area of "1" but this solution does not.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
that's also one way of doing indeed :) You should move to Perl golf problems to have even more fun ^_^
Loading more items...