180k views
4 votes
opy the code below into the coderunner window. 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)\

User Bolkay
by
6.0k points

1 Answer

1 vote

This code runs correct if you put every statement on a new line. You will want to replace e = "E" with e = "E-I-E-I-O" and add some spaces in the strings here and there so that the text is properly formatted. That'll be obvious after you run it for the first time.

User AdilZ
by
5.9k points