Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 19 Online
OpenStudy (anonymous):

I'm confused on ps3, on the first part. I get the same answers as the test function but it still says failure. I put print statements in and it looks like for my type it says none. Why is it doing this? 18 ('was', 7) None FAILURE: test_get_word_score() Expected 18 points but got 'None' for word 'was', n=7

OpenStudy (anonymous):

Here's my code: score = 0 for i in range(0, len(word)): score = SCRABBLE_LETTER_VALUES[word[i]] + score if n <= len(word): score = 50 + len(word)*score else: score = score*len(word) print score

OpenStudy (anonymous):

Nevermind I realized what I did wrong. I forgot the return statement. Wow do I feel humbled haha oh well.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!