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.
erhm, did you not notice the top solution? ;)
I know this is 17 months old, but thank you for this! I actually didnt know you could remove the else and just add another return for "Odd".
The Func part is a delegate and the (x) => ... part is a lambda expresion but I don't know the advantage of using them here.
As g964 says in your post below, you are missing a using statement - add
using System;
above everything else in your solution.Math
is short forSystem.Math
in C#, but you need the initial using statement for this to work.Alternatively you could replace
Math
withSystem.Math
everywhere in your solution.Please before posting issues look at the top of the page: 4975 people passed the C# kata so you could have seen that it's not an issue of the kata but a problem of your code. To use Math.Pow you need "using System;".
In that case a == b, so it's indifferent which of them is returned. In the current case b will be returned, but the condition could be a >= b as well in which case a would be returned when the are equal.
then either one is ok