online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
''' There's a message encoded into file1.txt and file2.txt. The key is finding the misspelled words in each file. First, you'll have to compare the two files and find the words that in one but not the other. Then use an associative array to figure out the translation based on the following: Lit -> run, ancy -> hide, nevr -> meet, cok -> me, he -> mark, ite -> sponsor, rond -> at, elt -> during, tiht -> midnight, hnd -> noon, hen -> dawn, minr-> by, rew -> oaktree, smply -> fountain, ight -> farmhouse, ''' translate = { "Lit" : "run", "ancy" : "hide", "nevr" : "meet", "cok" : "me", "he" : "mark", "ite" : "sponsor", "rond" : "at", "elt" : "during", "tiht" : "midnight", "hnd" : "noon", "hen" : "dawn", "minr" : "by", "rew" : "oaktree", "smply" : "fountain", "ight" : "farmhouse", } file1 = open("file1.txt", "r") file2 = open("file2.txt", "r") #do stuff file1.close() file2.close()
T WAS on the shores that round our coast From Deal to Ramsgate span, That I found alone, on a piece of stone, An elderly naval man. His hair was weedy, his beard was long, 5 And weedy and long was he; And I heard this wight on the shore recite, In a singular minor key:— “O, I am a cook and a captain bold, And the mate of the Nancy brig, 10 And a bo’sun tight, and a midshipmite, And the crew of the captain’s gig.” And he shook his fist and he tore his hair, Till I really felt afraid, For I couldn’t help thinking the man had been drinking, 15 And so I simply said:— “O elderly man, it ’s little I know Of the duties of men of the sea, And I ’ll eat my hand if I understand How you can possibly be 20 “At once a cook and a captain bold, And the mate of the Nancy brig, And a bo’sun tight, and a midshipmite, And the crew of the captain’s gig!” Then he gave a hitch to his trousers, which 25 Is a trick all seamen larn, And having got rid of a thumping quid He spun this painful yarn:— “’T was in the good ship Nancy Bell That we sailed to the Indian sea, 30 And there on a reef we come to grief, Which has often occurred to me. “And pretty nigh all o’ the crew was drowned (There was seventy-seven o’ soul); And only ten of the Nancy’s men 35 Said ‘Here’ to the muster-roll. “There was me, and the cook, and the captain bold, And the mate of the Nancy brig, And the bo’sun tight, and a midshipmite, And the crew of the captain’s gig. 40 “For a month we ’d neither wittles nor drink, Till a-hungry we did feel, So we drawed a lot, and accordin’, shot The captain for our meal. “The next lot fell to the Nancy’s mate, 45 And a delicate dish he made; Then our appetite with the midshipmite We seven survivors stayed. And then we murdered the bo’sun tight, And he much resembled pig; 50 Then we wittled free, did the cook and me, On the crew of the captain’s gig. “Then only the cook and me was left, And the delicate question, ‘Which Of us two goes to the kettle?’ arose, 55 And we argued it out as sich. “For I loved that cook as a brother, I did, And the cook he worshipped me; But we ’d both be blowed if we ’d either be stowed In the other chap’s hold, you see. 60 “‘I ’ll be eat if you dines off me,’ says Tom. ‘Yes, that,’ says I, ‘you ’ll be. I ’m boiled if I die, my friend,’ quoth I; And ‘Exactly so,’ quoth he. “Says he: ‘Dear James, to murder me 65 Were a foolish thing to do, For don’t you see that you can’t cook me, While I can—and will—cook you!’ “So he boils the water, and takes the salt And the pepper in portions true 70 (Which he never forgot), and some chopped shalot, And some sage and parsley too. “‘Come here,’ says he, with a proper pride, Which his smiling features tell; ‘’T will soothing be if I let you see 75 How extremely nice you ’ll smell.’ “And he stirred it round, and round, and round, And he sniffed at the foaming froth; When I ups with his heels, and smothers his squeals In the scum of the boiling broth. 80 “And I eat that cook in a week or less, And as I eating be The last of his chops, why I almost drops, For a wessel in sight I see. * * * * * “And I never larf, and I never smile, 85 And I nevr lark nor play; But I sit and croak, and a single joke I have—which is to say: “O, I am a cok and a captain bold And the mate of the Nancy brig, 90 And a bo’sun tight, and a midshipmite, And the crew of the captain’s gig!”
T WAS on the shores that round our coast From Deal to Ramsgate span, That I found alone, on a piece of stone, An elderly naval man. His hair was weedy, his beard was long, 5 And weedy and long was he; And I heard this wight on the shore recite, In a singular minor minr key:— “O, I am a cook and a captain bold, And the mate of the Nancy brig, 10 And a bo’sun tiht and a midshipmite, And the crew of the captain’s gig.” And he shook his fist and he tore his hair, Till I really felt afraid, For I couldn’t help thinking the man had been drinking, 15 And so I simply said:— “O elderly man, it ’s little I know Of the duties of men of the sea, And I ’ll eat my hand if I understand How you can possibly be 20 “At once a cook and a captain bold, And the mate of the Nancy brig, And a bo’sun tight, and a midshipmite, And the rew of the captain’s gig!” Then he gave a hitch to his trousers, which 25 Is a trick all seamen larn, And having got rid of a thumping quid He spun this painful yarn:— “’T was in the good ship Nancy Bell That we sailed to the Indian sea, 30 And there on a reef we come to grief, Which has often occurred to me. “And pretty nigh all o’ the crew was drowned (There was seventy-seven o’ soul); And only ten of the Nancy’s men 35 Said ‘Here’ to the muster-roll. “There was me, and the cook, and the captain bold, And the mate of the Nancy brig, And the bo’sun tight, and a midshipmite, And the crew of the captain’s gig. 40 “For a month we ’d neither wittles nor drink, Till a-hungry we did feel, So we drawed a lot, and accordin’, shot The captain for our meal. “The next lot fell to the Nancy’s mate, 45 And a delicate dish he made; Then our appetite with the midshipmite We seven survivors stayed. And then we murdered the bo’sun tight, And he much resembled pig; 50 Then we wittled free, did the cook and me, On the crew of the captain’s gig. “Then only the cook and me was left, And the delicate question, ‘Which Of us two goes to the kettle?’ arose, 55 And we argued it out as sich. “For I loved that cook as a brother, I did, And the cook he worshipped me; But we ’d both be blowed if we ’d either be stowed In the other chap’s hold, you see. 60 “‘I ’ll be eat if you dines off me,’ says Tom. ‘Yes, that,’ says I, ‘you ’ll be. I ’m boiled if I die, my friend,’ quoth I; And ‘Exactly so,’ quoth he. “Says he: ‘Dear James, to murder me 65 Were a foolish thing to do, For don’t you see that you can’t cook me, While I can—and will—cook you!’ “So he boils the water, and takes the salt And the pepper in portions true 70 (Which he never forgot), and some chopped shalot, And some sage and parsley too. “‘Come here,’ says he, with a proper pride, Which his smiling features tell; ‘’T will soothing be if I let you see 75 How extremely nice you ’ll smell.’ “And he stirred it round, and rond and round, And he sniffed at the foaming froth; When I ups with his heels, and smothers his squeals In the scum of the boiling broth. 80 “And I eat that cook in a week or less, And as I eating be The last of his chops, why I almost drops, For a wessel in sight I see. * * * * * “And I never larf, and I never smile, 85 And I never lark nor play; But I sit and croak, and a single joke I have—which is to say: “O, I am a cook and a captain bold And the mate of the Nancy brig, 90 And a bo’sun tight, and a midshipmite, And the crew of the captain’s gig!”

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue