Question: Write a progam for The Wheels On the Bus song that is similar to the Ants go Martching song program # c06ex02.py # Prints lyrics
Write a progam for "The Wheels On the Bus" song that is similar to the "Ants go Martching" song program
# c06ex02.py
# Prints lyrics for "The Ants Go Marching".
def verse(number, action):
print(march(number), hurrah())
print(march(number), hurrah())
print(march(number))
print(littleOne(action))
refrain()
def march(number):
return "The ants go marching %s by %s," % (number,number)
def hurrah():
return "hurrah! hurrah!"
def littleOne(action):
return "The little one stops to "+action+","
def refrain():
print("And they all go marching down...")
print("In the ground...")
print("To get out...")
print("Of the rain.")
print("Boom! " * 3)
def main():
actions = [ ("one", "suck his thumb"),
("two", "tie his shoe"),
("three", "climb a tree"),
("four", "shut the door"),
("five", "take a dive"),
("six", "pick up sticks"),
("seven", "talk to Kevin"),
("eight", "jump the gate"),
("nine", "swing on a vine"),
("ten", "say 'The End'") ]
for n,a in actions:
verse(n,a)
print()
input("Press
main()
Wheels on the bus lyrics (Turn lyrics into python program like The ants go matching program above)
The wheels on the bus go round and round Round and round, round and round The wheels on the bus go round and round All through the town. The wipers on the bus go "Swish, swish, swish, Swish, swish, swish, swish, swish, swish" The wipers on the bus go "Swish, swish, swish" All through the town. The door on the bus goes open and shut Open and shut, open and shut The door on the bus goes open and shut All through the town. The horn on the bus goes "Beep, beep, beep Beep, beep, beep, beep, beep, beep" The horn on the bus goes "Beep, beep, beep" All through the town. The gas on the bus goes "Glunk, glunk, glunk Glunk, glunk, glunk, glunk, glunk, glunk" The gas on the bus goes "Glunk, glunk, glunk" All through the town. The money on the bus goes "Clink, clink, clink, Clink, clink, clink, clink, clink, clink" The money on the bus goes "Clink, clink, clink" All through the town. The baby on the bus says, "Wah, wah, wah! Wah, wah, wah, wah, wah, wah!" The baby on the bus says, "Wah, wah, wah!" All through the town. The people on the bus say, "Shh, shh, shh, Shh, shh, shh, shh, shh, shh" The people on the bus say, "Shh, shh, shh" All through the town. The mommy on the bus says, "I love you, I love you, I love you" The daddy on the bus says, "I love you, too" All through the town.
Program for wheels on the bus must be similar to the Ants go Martching python program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
