Last active
November 13, 2020 01:06
-
-
Save mkbcodes/9cfba252151743dee8816d91a105df84 to your computer and use it in GitHub Desktop.
Old MacDonald Had A Farm...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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