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.
True, that is a new kata and not this one as it is simple.
From the kata "There are a few assumptions we will accept the year 0, even though there is no year 0 in the Gregorian Calendar."
As stated in the kata year 0 is an assumption made.
This is following the rules and so will not be changed.
Leap Year Definition. A year is a leap year if it is evenly divisible by 4 but not evenly divisible by 100 unless it is also evenly divisible by 400. So 1996 was a leap year. But 1900 was not a leap year because, although it is divisible by 4, it is also divisible by 100 and not by 400. 2000 is a leap year because it is divisible by 400.
This was in the exception, Century years are NOT leap years UNLESS they can be evenly divided by 400.
What are you doing?
Are you adding a year as an integer and then returning that interger in a string?
For example if I enter 2000 as the integer in the function, 2000 is a leap year then the following is returned
2000 has 366 days
If I enter 2001 as the integer in the function, 2001 is not a leap year then the following is returned
2001 has 365 days
A year has 365 days, a leap year has 366 days. If it is a leap year display 365 days. If it is a leap year display 366 days.
Thank you Giacomo for amending
Thank you, I will include this in the future.
I have amended the wording of the kata
I do approve them a nice concise answer. Thank you
Thank you Giacomo :-)
Thank you. I have amended the description to state that this kata will accept 0.
Thank you very much
Thanks acraileanu. Yes its a variation of the same kata with a slight difference which includes some concatination of the int value used by the function. So not quite a duplicate
Loading more items...