Skip to content

vittoriomigliore/kata-12-days-christmas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

12 Days of Christmas Song - TypeScript Implementation

This project is aimed at learning TypeScript, Test-Driven Development (TDD) and Incremental Coding by implementing the 12 Days of Christmas kata.
The 12 Days of Christmas is a classic programming problem that involves generating the verses of the traditional Christmas carol "The Twelve Days of Christmas."

Problem Description

Imagine being in a music class where the teacher introduces a game called "The 12 Days of Christmas".
The rules are simple:

  • Generate the lyrics for the song "The Twelve Days of Christmas".
  • The song has 12 verses, each verse builds on the previous one, adding a new gift each day.

Sample Output

The lyrics are as follows:

On the first day of Christmas
My true love sent to me:
A partridge in a pear tree.

On the second day of Christmas
My true love sent to me:
Two turtle doves and
A partridge in a pear tree.

On the third day of Christmas
My true love sent to me:
Three french hens
Two turtle doves and
A partridge in a pear tree.

On the fourth day of Christmas
My true love sent to me:
Four calling birds
Three french hens
Two turtle doves and
A partridge in a pear tree.

On the fifth day of Christmas
My true love sent to me:
Five golden rings
Four calling birds
Three french hens
Two turtle doves and
A partridge in a pear tree.

On the sixth day of Christmas,
My true love sent to me:
Six geese a-laying
Five golden rings
Four calling birds
Three french hens
Two turtle doves and
A partridge in a pear tree.

On the seventh day of Christmas,
My true love sent to me:
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.

On the eight day of Christmas,
My true love sent to me:
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.

On the ninth day of Christmas,
My true love sent to me:
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.

On the tenth day of Christmas,
My true love sent to me:
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.

On the eleventh day of Christmas,
My true love sent to me:
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.

On the twelfth day of Christmas,
My true love sent 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.

Kata Link

For more information about the FizzBuzz kata, visit Twelve Days of Christmas Song.

TDD Course

This project is being used as a practice exercise alongside the email course Test-Driven Development 101 by Daniele Scillia.
The course has been instrumental in learning TDD principles and techniques.

Contributing

Contributions are welcome! If you have any suggestions or improvements, please feel free to open an issue or create a pull request.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published