Question: Write a PYTHON program that will print the following song to screen (SONG IS BELOW). Use functions to define the chorus or parts that repeat
Write a PYTHON program that will print the following song to screen (SONG IS BELOW).
Use functions to define the chorus or parts that repeat through the song.
Use parameters for the special words that change in the chorus (only the number).
Notice how the last verse says "1 little monkey" as opposed to "1 little monkeys and He fell down as opposed to One fell down. Make sure your program prints those lines correctly.
TIP: You should use an if / else structure in your chorus function to write the first and second lines of the chorus in the proper way.
Make sure your program displays an empty line after each verse so that the song is easy to read.
Use a for loop that counts from 5 down to 1 and calls the chorus function each time with the appropriate parameter.
You should have only one call to the chorus function inside the for loop.
SONG:
5 little monkeys jumping on the bed
One fell down and bump his head
Mama called the doctor and the doctor said
No more monkeys jumping on the bed
4 little monkeys jumping on the bed
One fell down and bump his head
Mama called the doctor and the doctor said
No more monkeys jumping on the bed
3 little monkeys jumping on the bed
One fell down and bump his head
Mama called the doctor and the doctor said
No more monkeys jumping on the bed
2 little monkeys jumping on the bed
One fell down and bump his head
Mama called the doctor and the doctor said
No more monkeys jumping on the bed
1 little monkey jumping on the bed
He fell down and bump his head
Mama called the doctor and the doctor said
No more monkeys jumping on the bed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
