Instructions
The following code is meant to output verses of Old MacDonald had a farm. So if the user types in Python for an animal and ssss for the sound, it should output:
Old Macdonald had a farm, E-I-E-I-O
And on his farm he had a Python, E-I-E-I-O
With a ssss-ssss here and a ssss-ssss there
Here a ssss there a ssss
Everywhere a ssss-ssss
Old Macdonald had a farm, E-I-E-I-O
Copy and paste the code below into CodeSkulptor and then debug the code so that it outputs the verses correctly.
a = input("Enter an animal: ")
s = input ("Enter a sound: ")
e = "E"
print ("Old Macdonald had a farm, " + e)
print ("And on his farm he had a" + a + "," + e)
print ("With a " + a + "-" + a + " here and a" + s + "-" + s + " there")
print ("Here a "+ s+ " there a " +s)
print ("Everywhere a" + s + "-" + a )
print ("Old Macdonald had a farm," + e)
1
Expert's answer
2020-03-12T07:55:21-0400
Dear brittany, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment