Python

Ants Go Marching

8 points

In this program, you write a function that prints the lyrics for verses of "The Ants Go Marching." The function accepts two parameters, a number and a brief phrase that rhymes with the number. In the screenshot below, the two strings sent into the function are "one" and "suck his thumb". The function also provides the rest of the lyrics. Only the first stanza (of ten) is shown.

 

Video

The video below shows a completed program being run. Just the first stanza is shown.

 

Starting Point

Download Ants.py as a starting point for the project. The file guides you towards completing the program.

 

The idea for this program came from Python Programming: An Introduction to Computer Science, Second Edition by John Zelle.