Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

NOTE : Is learning Python programming (currently on chapter 9) with the following textbook: Book Starting Out With Python 3rd Edition by Gaddis

NOTE: Is learning "Python programming" (currently on chapter 9) with the following textbook:

Book "Starting Out With Python" 3rd Edition by Gaddisimage text in transcribed

image text in transcribed

BELOW ARE ALL OF MY FILES:

visitofthehead.txt

Eldorado

By Edgar Allan Poe

Gaily bedight

A gallant knight

In sunshine and in shadow

Had journeyed long

Singing a song

In search of Eldorado

But he grew old

This knight so bold

And oer his heart a shadow

Fell as he found

No spot of ground

That looked like Eldorado

And as his strength

Failed him at length

He met a pilgrim shadow

Shadow said he

Where can it be

This land of Eldorado

Over the Mountains

Of the Moon

Down the Valley of the Shadow

Ride boldly ride

The shade replied

If you seek for Eldorado

deathandlife.txt

Death And Life

By Emily Elizabeth Dickinson

Apparently with no surprise

To any happy flower

The frost beheads it at its play

In accidental power

The blond assassin passes on

The sun proceeds unmoved

To measure off another day

For an approving God

eldorado.txt

Eldorado

By Edgar Allan Poe

Gaily bedight

A gallant knight

In sunshine and in shadow

Had journeyed long

Singing a song

In search of Eldorado

But he grew old

This knight so bold

And oer his heart a shadow

Fell as he found

No spot of ground

That looked like Eldorado

And as his strength

Failed him at length

He met a pilgrim shadow

Shadow said he

Where can it be

This land of Eldorado

Over the Mountains

Of the Moon

Down the Valley of the Shadow

Ride boldly ride

The shade replied

If you seek for Eldorado

longshadowongrass.txt

Presentiment Is That Long Shadow On The Lawn

By Emily Elizabeth Dickinson

Presentiment is that long shadow on the lawn

Indicative that suns go down

The notice to the startled grass

That darkness is about to pass

raven.txt

The Raven

By Edgar Allan Poe

Once upon a midnight dreary while I pondered weak and weary

Over many a quaint and curious volume of forgotten lore

While I nodded nearly napping suddenly there came a tapping

As of some one gently rapping rapping at my chamber door

Tis some visitor I muttered tapping at my chamber door

Only this and nothing more

Ah distinctly I remember it was in the bleak December

And each separate dying ember wrought its ghost upon the floor

Eagerly I wished the morrow vainly I had sought to borrow

From my books surcease of sorrow sorrow for the lost Lenore

For the rare and radiant maiden whom the angels name Lenore

Nameless here for evermore

And the silken sad uncertain rustling of each purple curtain

Thrilled me filled me with fantastic terrors never felt before

So that now to still the beating of my heart I stood repeating

Tis some visitor entreating entrance at my chamber door

Some late visitor entreating entrance at my chamber door

This it is and nothing more

Presently my soul grew stronger hesitating then no longer

Sir said I or Madam truly your forgiveness I implore

But the fact is I was napping and so gently you came rapping

And so faintly you came tapping tapping at my chamber door

That I scarce was sure I heard you here I opened wide the door

Darkness there and nothing more

Deep into that darkness peering long I stood there wondering fearing

Doubting dreaming dreams no mortals ever dared to dream before

But the silence was unbroken and the stillness gave no token

And the only word there spoken was the whispered word Lenore

This I whispered and an echo murmured back the word Lenore

Merely this and nothing more

Back into the chamber turning all my soul within me burning

Soon again I heard a tapping somewhat louder than before

Surely said I surely that is something at my window lattice:

Let me see then what thereat is and this mystery explore

Let my heart be still a moment and this mystery explore

Tis the wind and nothing more

Open here I flung the shutter when with many a flirt and flutter

In there stepped a stately raven of the saintly days of yore

Not the least obeisance made he not a minute stopped or stayed he

But with mien of lord or lady perched above my chamber door

Perched upon a bust of Pallas just above my chamber door

Perched and sat and nothing more

Then this ebony bird beguiling my sad fancy into smiling

By the grave and stern decorum of the countenance it wore

Though thy crest be shorn and shaven thou I said art sure no craven

Ghastly grim and ancient raven wandering from the Nightly shore

Tell me what thy lordly name is on the Nights Plutonian shore

Quoth the Raven Nevermore

Much I marveled this ungainly fowl to hear discourse so plainly

Though its answer little meaning little relevancy bore

For we cannot help agreeing that no living human being

Ever yet was blest with seeing bird above his chamber door

Bird or beast upon the sculptured bust above his chamber door

With such name as Nevermore

But the raven sitting lonely on the placid bust spoke only

That one word as if his soul in that one word he did outpour

Nothing further then he uttered not a feather then he fluttered

Till I scarcely more than muttered other friends have flown before

On the morrow he will leave me as my hopes have flown before

Then the bird said Nevermore

Startled at the stillness broken by reply so aptly spoken

Doubtless said I what it utters is its only stock and store

Caught from some unhappy master whom unmerciful Disaster

Followed fast and followed faster till his songs one burden bore

Till the dirges of his Hope that melancholy burden bore

Of Never nevermore

But the Raven still beguiling all my fancy into smiling

Straight I wheeled a cushioned seat in front of bird and bust and door

Then upon the velvet sinking I betook myself to linking

Fancy unto fancy thinking what this ominous bird of yore

What this grim ungainly ghastly gaunt and ominous bird of yore

Meant in croaking Nevermore

This I sat engaged in guessing but no syllable expressing

To the fowl whose fiery eyes now burned into my bosoms core

This and more I sat divining with my head at ease reclining

On the cushions velvet lining that the lamplight gloated oer

But whose velvet violet lining with the lamplight gloating oer

She shall press ah nevermore

Then methought the air grew denser perfumed from an unseen censer

Swung by Seraphim whose footfalls tinkled on the tufted floor

Wretch I cried thy God hath lent thee by these angels he hath sent thee

Respite respite and nepenthe from thy memories of Lenore

Quaff oh quaff this kind nepenthe and forget this lost Lenore

Quoth the Raven Nevermore

Prophet said I thing of evil prophet still if bird or devil

Whether Tempter sent or whether tempest tossed thee here ashore

Desolate yet all undaunted on this desert land enchanted

Then this ebony bird beguiling my sad fancy into smiling

By the grave and stern decorum of the countenance it wore

Though thy crest be shorn and shaven thou I said art sure no craven

Ghastly grim and ancient raven wandering from the Nightly shore

Tell me what thy lordly name is on the Nights Plutonian shore

Quoth the Raven Nevermore

Much I marveled this ungainly fowl to hear discourse so plainly

Though its answer little meaning little relevancy bore

For we cannot help agreeing that no living human being

Ever yet was blest with seeing bird above his chamber door

Bird or beast upon the sculptured bust above his chamber door

With such name as Nevermore

But the raven sitting lonely on the placid bust spoke only

That one word as if his soul in that one word he did outpour

Nothing further then he uttered not a feather then he fluttered

Till I scarcely more than muttered other friends have flown before

On the morrow he will leave me as my hopes have flown before

Then the bird said Nevermore

Startled at the stillness broken by reply so aptly spoken

Doubtless said I what it utters is its only stock and store

Caught from some unhappy master whom unmerciful Disaster

Followed fast and followed faster till his songs one burden bore

Till the dirges of his Hope that melancholy burden bore

Of Never nevermore

But the Raven still beguiling all my fancy into smiling

Straight I wheeled a cushioned seat in front of bird and bust and door

Then upon the velvet sinking I betook myself to linking

Fancy unto fancy thinking what this ominous bird of yore

What this grim ungainly ghastly gaunt and ominous bird of yore

Meant in croaking Nevermore

This I sat engaged in guessing but no syllable expressing

To the fowl whose fiery eyes now burned into my bosoms core

This and more I sat divining with my head at ease reclining

On the cushions velvet lining that the lamplight gloated oer

But whose velvet violet lining with the lamplight gloating oer

She shall press ah nevermore

Then methought the air grew denser perfumed from an unseen censer

Swung by Seraphim whose footfalls tinkled on the tufted floor

Wretch I cried thy God hath lent thee by these angels he hath sent thee

Respite respite and nepenthe from thy memories of Lenore

Quaff oh quaff this kind nepenthe and forget this lost Lenore

Quoth the Raven Nevermore

Prophet said I thing of evil prophet still if bird or devil

Whether Tempter sent or whether tempest tossed thee here ashore

Desolate yet all undaunted on this desert land enchanted

On this home by horror haunted tell me truly I implore

Is there is there balm in Gilead tell me tell me I implore

Quoth the Raven Nevermore

Prophet said I thing of evil prophet still if bird or devil

By that Heaven that bends above us by that God we both adore

Tell this soul with sorrow laden if within the distant Aidenn

It shall clasp a sainted maiden whom the angels name Lenore

Clasp a rare and radiant maiden whom the angels name Lenore

Quoth the Raven Nevermore

Be that word our sign in parting bird or fiend I shrieked upstarting

Get thee back into the tempest and the Nights Plutonian shore

Leave no black plume as a token of that lie thy soul hath spoken

Leave my loneliness unbroken quit the bust above my door

Take thy beak from out my heart and take thy form from off my

door Quoth the Raven Nevermore

And the Raven never flitting still is sitting still is sitting

On the pallid bust of Pallas just above my chamber door

And his eyes have all the seeming of a demons that is dreaming

And the lamplight oer him streaming throws his shadow on the floor

And my soul from out that shadow that lies floating on the floor

Shall be lifted nevermore

theperdigreeofhoney.txt

The Pedigree Of Honey

By Emily Elizabeth Dickinson

The pedigree of honey

Does not concern the bee

A clover any time to him

Is aristocracy

Problems 1. Write a program that reads the contents of two text files and compares them in the following ways. Ask the user for the names of the files. It should display a list of all the unique words contained in either file. It should display a list of the words that appear in both files It should display a list of the words that appear in the first file but not the second. It should display a list of the words that appear in the second file but not the first It should display a list of the words that appear in either the first or second file but not both. Hant: Use set operations to perform these analyses Make your life easier and create a function that reads the file, cleans the text (puts it all lowercase), and returns a set containing the words from the file. /workspace/HW/ $ python number01.py Enter first flle's name: VISitolthedead.txt Enter second fille' s name: deathandliie.txt All words contained in the files: can, blond, by, pilgrim, allan, length, heart, elizabeth, over, bold, play, long, moon, dickinson, a, in, where, life, replied, shade, fell, and, spot, as, had, at, gaily, boldly, this, poe, so, his, the, to, it, beheads, of, sun, grew, seek, said, met, its, an, emily, with, on, happy, mountains, apparently, death, Jike, edgar, be, gallant, surprlse, another, valley, accidental, sunshine, falled, you, ground, 1f, him, shadow, eldorado, Irost, Ilower, day, power, passes, but, oer, he, god, down, singing, found ride, old, approving

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago