Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write your code in python. This is the file message1.txt. There was a boy at our school, we used to call him Sandford and

Please write your code in python.image text in transcribed

This is the file message1.txt.

There was a boy at our school, we used to call him Sandford and Merton. His real name was Stivvings. He was the most extraordinary lad I ever came across. I believe he really liked study. He used to get into awful rows for sitting up in bed and reading Greek; and as for French irregular verbs there was simply no keeping him away from them. He was full of weird and unnatural notions about being a credit to his parents and an honour to the school; and he yearned to win prizes, and grow up and be a clever man, and had all those sorts of weak-minded ideas. I never knew such a strange creature, yet harmless, mind you, as the babe unborn.

Well, that boy used to get ill about twice a week, so that he couldn't go to school. There never was such a boy to get ill as that Sandford and Merton. If there was any known disease going within ten miles of him, he had it, and had it badly. He would take bronchitis in the dog-days, and have hay-fever at Christmas. After a six weeks' period of drought, he would be stricken down with rheumatic fever; and he would go out in a November fog and come home with a sunstroke.

They put him under laughing-gas one year, poor lad, and drew all his teeth, and gave him a false set, because he suffered so terribly with toothache; and then it turned to neuralgia and ear-ache. He was never without a cold, except once for nine weeks while he had scarlet fever; and he always had chilblains. During the great cholera scare of 1871, our neighbourhood was singularly free from it. There was only one reputed case in the whole parish: that case was young Stivvings.

He had to stop in bed when he was ill, and eat chicken and custards and hot-house grapes; and he would lie there and sob, because they wouldn't let him do Latin exercises, and took his German grammar away from him.

And we other boys, who would have sacrificed ten terms of our school-life for the sake of being ill for a day, and had no desire whatever to give our parents any excuse for being stuck-up about us, couldn't catch so much as a stiff neck. We fooled about in draughts, and it did us good, and freshened us up; and we took things to make us sick, and they made us fat, and gave us an appetite. Nothing we could think of seemed to make us ill until the holidays began. Then, on the breaking-up day, we caught colds, and whooping cough, and all kinds of disorders, which lasted till the term recommenced; when, in spite of everything we could manoeuvre to the contrary, we would get suddenly well again, and be better than ever.

Such is life; and we are but as grass that is cut down, and put into the oven and baked.

1. Write a program that takes a key (a number from 1 to 26) an input file name, and an output file name from the command line and uses the key to encrypt it with a Caesar cipher. A Caesar cipher performs modular addition of the key and the letter. If the key is 1 then a->b, b->C, ..., y->z, z->a . Ignore all the things that aren't the letters from a to z (simply pass them through) and you will want to put the letters into lower case. Use the file messagel.txt and a key of 9 to encrypt it

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

Progress Monitoring Data Tracking Organizer

Authors: Teacher'S Aid Publications

1st Edition

B0B7QCNRJ1

More Books

Students also viewed these Databases questions

Question

fscanf retums a special value EOF that stands for...

Answered: 1 week ago