anonymous

4 years ago

I have completed PS4
all working OK until last bit - def decrypt_fable():
my attempt did not work.
The program ran for a while!
I tried the problem set solution
with the following two lines added
text = decrypt_fable()
print text
again failure
I wonder if there is a problem with 'fable.txt'

having failed with my code I used the complete code from PS4 solution as zipped from the MIT site
I entered:-
text = decrypt_fable()
print text
at end of code to run last function
I used the complete folder from MIT - so no files missing
I would appreciate somebody running MIT PS4 solution to see if it also fails
Simon

As msmithhnova said, it would take a while to run the codes. It was running though you couldn't see anything on your screen.
If you want to know more about what codes are doing, you can just add a 'print' . See here:
http://pastebin.com/khjEKqqm
There are my decrypted words, not very perfect:
An Ingenious Man who had built a flying machine invited a great concourse of people to see it go up. at the appointed moment, everything being ready, he boarded the car and turned a a he power. the machine immediately broke through the massive substructure upon which it was builded, and sank out of sight into the earth, the aeronaut springing out barely in time to save himself. "well," said he, "i have done enough to demonstrate the correctness of my details. the defects," he added, with a add hat the ruined brick work, "are merely basic and fundamental." upon this assurance the people came ox ward with subscriptions to build a second machine

The first time I ran it, I didn't realize how long the text was and thought it hit an infinite loop. I used ctrl-c to break out of it. I then went to the 'debug' menu and 'stack viewer'. I opened the 'locals' for the bottom item. The 's' and 'text' variables showed a partially decoded string and a lot of characters after it so I just left it run longer the second time and it completed in about 7-8min on the system I was running it on.