Skip to content

kolinatasha/12days_python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

def test_second_day():

assert twelve_days(2) == "On the second day of Christmas"

12days_python

Twelve Days of Christmas song in Python

Write the smallest program that outputs the lyrics of the Xmas carol The Twelve Days of Xmas. You must reproduce the words in the correct order, but case, format, and punctuation are left to your discretion.

The lyrics are as follows:

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 third day of Christmas My true love gave to me: Three french hens Two turtle doves and A partridge in a pear tree.

On the fourth day of Christmas My true love gave 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 gave 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 gave 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 gave 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 gave 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 gave 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 gave 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 gave 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 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.

[Source https://rosettacode.org] Via [Cyber-dojo.org]

About

Twelve Days of Christmas song in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%