Skip to main content
deleted 22 characters in body
Source Link
macek
  • 379
  • 1
  • 3
  • 7

I thought this would be a fun challenge for everyone and I'm curious to see the solutions people come up with.

Print the "12 Days Of Christmas" lyrics

On the first day of Christmas, 
my true love gave to me,
A partridge in a pear tree. 

On the second day of Christmas, 
my true love gave to me,
Two turtle doves, 
And a partridge in a pear tree. 

...

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.

Rules

  • You don't have to worry about capitalization; the entire text can be case insensitive
  • You can sensibly ignore any punctuation: hyphens can be spaces, and commas and periods can be ignored
  • There should be a blank line between each verse
  • You must ordinalize your numbers: "first day of Christmas", "Four calling birds", etc
  • Shortest code wins

I thought this would be a fun challenge for everyone and I'm curious to see the solutions people come up with.

Print the "12 Days Of Christmas" lyrics

On the first day of Christmas, 
my true love gave to me,
A partridge in a pear tree. 

On the second day of Christmas, 
my true love gave to me,
Two turtle doves, 
And a partridge in a pear tree. 

...

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.

Rules

  • You don't have to worry about capitalization; the entire text can be case insensitive
  • You can sensibly ignore any punctuation: hyphens can be spaces, and commas and periods can be ignored
  • There should be a blank line between each verse
  • You must ordinalize your numbers: "first day of Christmas", "Four calling birds", etc
  • Shortest code wins

I thought this would be a fun challenge for everyone and I'm curious to see the solutions people come up with.

Print the "12 Days Of Christmas" lyrics

On the first day of Christmas, 
my true love gave to me,
A partridge in a pear tree. 

On the second day of Christmas, 
my true love gave to me,
Two turtle doves, 
And a partridge in a pear tree. 

...

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.

Rules

  • You don't have to worry about capitalization; the entire text can be case insensitive
  • You can sensibly ignore any punctuation: hyphens can be spaces, and commas and periods can be ignored
  • There should be a blank line between each verse
  • You must ordinalize your numbers: "first day of Christmas", "Four calling birds", etc
edited tags
Link
boothby
  • 9.9k
  • 2
  • 35
  • 60
edited tags
Link
Peter Olson
  • 7.8k
  • 4
  • 35
  • 63
added 112 characters in body
Source Link
macek
  • 379
  • 1
  • 3
  • 7
Loading
Tweeted twitter.com/#!/StackCodeGolf/status/144557343282171905
added 240 characters in body
Source Link
macek
  • 379
  • 1
  • 3
  • 7
Loading
Source Link
macek
  • 379
  • 1
  • 3
  • 7
Loading