A couple of notes for approaching this homework:


"""
Write an application that prints the verses 
to "The Twelve Days of Christmas".  For example, if 
the user chooses to print all 12 verses, then the 
12th verse will look like this: 

        On the 12th 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

"""

import time

lines = ( "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" ) 

days = int(input("How many days should we do? (1 to 12): "))
if not (1 <= days <= 12):
    print("Days must be between 1 and 12.  Defaulting to 6.")
    days = 6

# Loop through the days, from the first
# until the number specified by the user
# NOTE: You may want to process Day 1 
# differently than the following days

# YOUR CODE STARTS HERE















# YOUR CODE ENDS HERE


For Day #1, the program will print:
On the 1st day of Christmas, my true love gave to me:
A Partridge in a Pear Tree
For Day #2, it will print:
On the 2nd day of Christmas, my true love gave to me:
Two Turtle Doves
and a Partridge in a Pear Tree
        
And so forth...

To produce the expected output, you will need to do the following things:
  1. Print the first line for that day:
    On the _____ day of Christmas, my true love gave to me:
    Note that, depending on the day, the blank will be filled with "1st", "2nd", "3rd", "4th", etc. You may want to use an if-else statement or a conditional expression for this. (Note that only "1st", "2nd", and "3rd" are irregular. As such, you won't need too many conditions.)
  2. Like the previous homework assignment, this one will involve nested loops. You have your outer loop that is responsible for the verses -- as well as your inner loop that is responsible for the lines of the current verse.
  3. Notice that the possible lines are in the tuple in descending order, from 12 through 1. This means that, as the days progress, you can use slices of the tuple to get the lines to print. (HINT: This is a situation where negative tuple indices may come in handy!)
  4. If you like, you may use the time.delay function to introduce pauses into your program, between verses and lines.
Note that because of user input, the output will look different each time you run the program. To this end, I have provided multiple examples of how the output could look.

Program output examples:

Example 1:

How many days should we do? (1 to 12):  3

On the 1st day of Christmas, my true love gave to me:
A Partridge in a Pear Tree

On the 2nd day of Christmas, my true love gave to me:
Two Turtle Doves
and a Partridge in a Pear Tree

On the 3rd day of Christmas, my true love gave to me:
Three French Hens
Two Turtle Doves
and a Partridge in a Pear Tree
        

Example 2:

+ Expand Output
How many days should we do? (1 to 12):  6

On the 1st day of Christmas, my true love gave to me:
A Partridge in a Pear Tree

On the 2nd day of Christmas, my true love gave to me:
Two Turtle Doves
...
        

Example 3:

+ Expand Output
How many days should we do? (1 to 12): 12

On the 1st day of Christmas, my true love gave to me:
A Partridge in a Pear Tree

On the 2nd day of Christmas, my true love gave to me:
Two Turtle Doves
...
        


In at least 150 words, please address the following questions in memo.txt:
  1. How did the process of creating these programs go for you?
  2. What were your main challenges and how did you overcome them?
  3. What did you learn that may be of use as you move along in this class?