12 Days of Christmas

Dec 3, 2022 9:00:00 AM

The goal of this Christmas themed kata is to print the lyrics to the 'Twelve Days of Christmas' song, with the smallest amount of lines possible.



You will create a single function where a day number is entered between 1 and 12 (inclusive).

This will then print out the lines for that day.


The output will always include the day that has been included and all the gifts given on that day.

For example, if you enter '1' for the first day, then it would print the following verse:

On the First day of Christmas,
My true love gave to me:
A partridge in a pear tree

And, for day 12, you would output the full lines giving the following verse:

On the Twelfth day of Christmas,
My true love gave to me:
Twelve drummers drumming,
Eleven pipers piping,
Ten lords a-leaping,
Nine ladies dancing,
Eight maids a-milking,
Seven swans a-swimming,
Six geese a-laying,
Five golden rings,
Four calling birds,
Three French hens,
Two turtle doves,
And a partridge in a pear tree.


Don't worry about capitalisations for this kata