Skip to content

Instantly share code, notes, and snippets.

@mkbcodes
Last active November 13, 2020 01:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkbcodes/9cfba252151743dee8816d91a105df84 to your computer and use it in GitHub Desktop.
Save mkbcodes/9cfba252151743dee8816d91a105df84 to your computer and use it in GitHub Desktop.
Old MacDonald Had A Farm...
def oldMacDonaldCows(a:str ,b:str):
first = b + ' ' + b
second = b
third = a
print("Old Macdonald Had a farm, E-I-E-I O!")
print("On his farm he had a ",third,", E-I-E-I O!")
print("With a ",first," here and a ",first," there, here a ",second,", there a ",second,", everywhere a ",first,"!")
print("Old MacDonald had a farm, E-I-E-I O!")
return
#first is moo moo with a space ; second is one moo, and third is the animal ie a cow!
#---------------------------------main code starts here---------------------------------
oldMacDonaldCows("Cow","moo")
oldMacDonaldCows("Chicken","cluck")
oldMacDonaldCows("Sheep","bawh")
def oldMacDonaldCows(a:str ,b:str):
first = b + ' ' + b
second = b
third = a
print("Old Macdonald Had a farm, E-I-E-I O!")
print("On his farm he had a ",third,", E-I-E-I O!")
print("With a ",first," here and a ",first," there, here a ",second,", there a ",second,", everywhere a ",first,"!")
print("Old MacDonald had a farm, E-I-E-I O!")
return
#first is moo moo with a space ; second is one moo, and third is the animal ie a cow!
#---------------------------------main code starts here---------------------------------
oldMacDonaldCows("Cow","moo")
oldMacDonaldCows("Chicken","cluck")
oldMacDonaldCows("Sheep","bawh")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment