Old MacDonald
Write a program 07-OldMacDonald
that prints out a series of verses for the song "Old MacDonald."
Each verse of the song uses an animal
and a sound
. For example, if the "dog" makes a "bark" sound, the verse is:
Old MacDonald had a farm, ee-yi-ee-yi-oh and on that farm he had a dog, ee-yi-ee-yi-oh With a bark, bark here, and a bark, bark there Here a bark, there a bark, everywhere a bark, bark Old MacDonald had a farm, ee-yi-ee-yi-oh
For this program, write a verse()
function that takes an animal
and a sound
as parameters and prints out the appropriate verse.
The main part of the script should call the verse()
function with a series of animal, sound
pairs so that the entire lyrics of the song are displayed.
Finishing Up
Once your program is working correctly, use your mouse to click-drag over the URL address for your project at the top of the browser window. Copy that link, and give that copied link to the instructor using the procedure given in class.