Pure Programmer
Blue Matrix


Cluster Map

Project: Old MacDonald Lyrics

Compute the full lyrics to the song Old MacDonald Had a Farm. Write a function to print a verse given the verse number. Use an array to hold the animal names and another array to hold the sounds that they make.

See [[Old MacDonald Had a Farm]]

Output
$ python3 OldMacDonaldLyrics.py Old MacDonald had a farm, E-I-E-I-O, and on that farm he had a dog, E-I-E-I-O, with a woof woof here and a woof woof there, here a woof, there a woof, everywhere a woof woof Old MacDonald had a farm, E-I-E-I-O, Old MacDonald had a farm, E-I-E-I-O, and on that farm he had a cat, E-I-E-I-O, with a meow meow here and a meow meow there, here a meow, there a meow, everywhere a meow meow Old MacDonald had a farm, E-I-E-I-O, Old MacDonald had a farm, E-I-E-I-O, and on that farm he had a pig, E-I-E-I-O, with a oink oink here and a oink oink there, here a oink, there a oink, everywhere a oink oink Old MacDonald had a farm, E-I-E-I-O, Old MacDonald had a farm, E-I-E-I-O, and on that farm he had a cow, E-I-E-I-O, with a moo moo here and a moo moo there, here a moo, there a moo, everywhere a moo moo Old MacDonald had a farm, E-I-E-I-O, Old MacDonald had a farm, E-I-E-I-O, and on that farm he had a lamb, E-I-E-I-O, with a baa baa here and a baa baa there, here a baa, there a baa, everywhere a baa baa Old MacDonald had a farm, E-I-E-I-O, Old MacDonald had a farm, E-I-E-I-O, and on that farm he had a horse, E-I-E-I-O, with a neigh neigh here and a neigh neigh there, here a neigh, there a neigh, everywhere a neigh neigh Old MacDonald had a farm, E-I-E-I-O, Old MacDonald had a farm, E-I-E-I-O, and on that farm he had a chick, E-I-E-I-O, with a peep peep here and a peep peep there, here a peep, there a peep, everywhere a peep peep Old MacDonald had a farm, E-I-E-I-O, Old MacDonald had a farm, E-I-E-I-O, and on that farm he had a turkey, E-I-E-I-O, with a gobble gobble here and a gobble gobble there, here a gobble, there a gobble, everywhere a gobble gobble Old MacDonald had a farm, E-I-E-I-O, Old MacDonald had a farm, E-I-E-I-O, and on that farm he had a duck, E-I-E-I-O, with a quack quack here and a quack quack there, here a quack, there a quack, everywhere a quack quack Old MacDonald had a farm, E-I-E-I-O,

Solution