Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

pelikan

I'm on PS6 Problem 4. I'm having trouble understanding exactly what they are asking for and the pseudo code they have provided. In particular the this part: Let d = {} For every word w in the word list: Let d[(string containing the letters of w in sorted order)] = w . What exactly do they mean by sorted order?

  • one year ago
  • one year ago

  • This Question is Closed
  1. RoamingBlue
    Best Response
    You've already chosen the best response.
    Medals 1

    @pelikan what class are you taking? I'm taking MIT 6_00SC and I don't see anything about the problem you describe in PS6 Problem 4. In mine, PS6 is all about programming robots.

    • one year ago
  2. pelikan
    Best Response
    You've already chosen the best response.
    Medals 0

    6.00 Intro to Computer Science. It's about a word game

    • one year ago
  3. RoamingBlue
    Best Response
    You've already chosen the best response.
    Medals 1

    Let d = {} For every word w in the word list: Let d[(string containing the letters of w in sorted order)] = w They say this part should be a preprocessing step ... so at the start of the program before you do anything else. Lets assume you have a word list containing the following words: python is pretty powerful first you would Let d = {} so it's empty Then for the first word, which is python Let d[(string containing the letters of w in sorted order)] = w or Let d['hnopty'] = 'python' because (string containing the letters of w in sorted order) = 'hnopty' Then repeat for the rest of the words (because it said for every word in the word list) so you end up with d['hnopty'] = 'python' d['is'] = 'is' d['erptty'] = 'pretty' d['elfopuwr'] = 'powerful'

    • one year ago
  4. pelikan
    Best Response
    You've already chosen the best response.
    Medals 0

    thanks. I wasn't sure if they meant sorting the words according to the value of each letter or if they just meant alphabetically. Thanks for the clarification!

    • one year ago
    • Attachments:

See more questions >>>

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.