Quantcast

A community for students. Sign up today!

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

SimpleSimon

  • 2 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'

  • This Question is Closed
  1. msmithhnova
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    It is a long text so give it at least 10 minutes to complete. Mine completed but the sentence structure wasn't perfect. I assumed that was normal.

  2. wctjerry
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Hi, Could you paste your codes of this function? Let's have a look at it.

  3. SimpleSimon
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    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

  4. wctjerry
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    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

  5. msmithhnova
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    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.

  6. Not the answer you are looking for?
    Search for more explanations.

    Search OpenStudy
    • Attachments:

Ask your own question

Ask a Question
Find more explanations on OpenStudy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.