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

PatrickD

Pulling my hair out -- Problem Set 3 Problem 5 I can't create a new list iterating through my corrected word list (after the perms function) to check the words for point values. for i in choosen_word: if is_valid_word(i, hand, word_list)== True: print type(i) print i print type(valid_list) print valid_list valid_list = valid_list.append[i]

  • one year ago
  • one year ago

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

    • one year ago
    1 Attachment
  2. slotema
    Best Response
    You've already chosen the best response.
    Medals 2

    Two things that I notice in this bit of code: First, append is a function and should be called accordingly (with '(' and ')' instead of '[' and ']'). Second, you call valid_list.append(i) and than you assign the result of that function to valid_list. But as far as I know, the append method does not return anything (also known as None in Python). So you append a value to the list properly by calling append, but afterwards you assign the value None to that same list. Try just calling append.

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

    it was originally coded that way -- i was just trying anything to get it to work -- i think you are right though my mistake was using the brackets instead of parenthesis -- ugh i spent like an hour trying to debug that

    • 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.