Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write an application that prints the verses to The Twelve Days of Christmas. For example, if the user chooses to print all 1 2 verses,

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions