Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

hi, please need help for lab python use in 3.4.2 shell Overview The children\'s

ID: 639954 • Letter: H

Question

hi, please need help for lab python use in 3.4.2 shell

Overview

The children's song that we'll work on is "There was an Old Lady". In case you aren't familiar with it, here are the lyrics:

There was an Old Lady

There was an old lady who swallowed a fly.
I don't know why she swallowed the fly.
Perhaps she'll die.

There was an old lady who swallowed a spider,
That wriggled and jiggled and tickled inside her.
She swallowed the spider to catch the fly.
I don't know why she swallowed the fly.
Perhaps she'll die.

There was an old lady who swallowed a bird.
How absurd to swallow a bird.
She swallowed the bird to catch the spider,
That wriggled and jiggled and tickled inside her.
She swallowed the spider to catch the fly.
I don't know why she swallowed the fly.
Perhaps she'll die.

There was an old lady who swallowed a cat.
Imagine that to swallow a cat.
She swallowed the cat to catch the bird.
She swallowed the bird to catch the spider,
That wriggled and jiggled and tickled inside her.
She swallowed the spider to catch the fly.
I don't know why she swallowed the fly.
Perhaps she'll die.

There was an old lady who swallowed a dog.
My, what a hog, to swallow a dog.
She swallowed the dog to catch the cat.
She swallowed the cat to catch the bird.
She swallowed the bird to catch the spider,
That wriggled and jiggled and tickled inside her.
She swallowed the spider to catch the fly.
I don't know why she swallowed the fly.
Perhaps she'll die.

{insert your own verse here

Explanation / Answer

#!/usr/bin/python

# Function definition is here
print("There was an old woman who swallowed a fly.");
swallowFly();

print("There was an old woman who swallowed a spider,");
print("That wriggled and iggled and jiggled inside her.");
swallowSpider();

print("There was an old woman who swallowed a bird,");
print("How absurd to swallow a bird.");
swallowBird();

print("There was an old woman who swallowed a cat,");
print("Imagine that to swallow a cat.");
swallowCat();

print("There was an old woman who swallowed a dog,");
print("What a hog to swallow a dog.");
swallowDog();

print("There was an old woman who swallowed a goat,");
print("She just opened her throat to swallow a goat.");
swallowGoat();

print("There was an old woman who swallowed a cow,");
print("I don't know how she swallowed a cow.");
swallowCow();

print("There was an old woman who swallowed a horse,");
print("She died of course.");


def swallowCow() :
print("She swallowed the cow to catch the goat,");
swallowGoat();


def swallowGoat():
print("She swallowed the goat to catch the dog,");
swallowDog();


def swallowDog():
print("She swallowed the dog to catch the cat,");
swallowCat();


def swallowCat():
print("She swallowed the cat to catch the bird,");
swallowBird();


def swallowBird():
print("She swallowed the bird to catch the spider,");
swallowSpider();


def swallowSpider():
print("She swallowed the spider to catch the fly,");
swallowFly();


def swallowFly():
print("I don't know why she swallowed that fly,");
print("Perhaps she'll die.");