I'm trying to write a program that displays the lyrics for "Old MacDonald", but when I run the program, I'm getting all of my first function's repeats followed by my second function's repeats. What I'm saying probably doesn't make much sense. Just look at the code.
def verseFor(animal):
lyrics = "Old MacDonald had a farm, Ee-igh, Ee-igh, Oh!\n" + \
"And on that farm he had a " + animal + ", Ee-igh, Ee-igh, Oh!"
return lyrics
def verseFor2(noise):
lyrics2 = "With a " + noise + ", " + noise + " here and a " + noise + ", " + noise + " there. Here a " + noise + ", there a " + noise + ", everywhere a " + noise + ", " + noise + ".\n" + \
"Old MacDonald had a farm, Ee-igh, Ee-igh, Oh!"
return lyrics2
def main():
for animal in ["cow", "duck", "sheep", "horse", "dog"]:
print(verseFor(animal))
for noise in ["moo", "quack", "baa", "neigh", "woof"]:
print(verseFor2(noise))
main()