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

In ps3a does the test_ps3a.py test harness verify that you have not modified/mutated hand or word_list if you pass all the tests? I'm not sure if I am modifying hand incorrectly. The problem set says that after the call to update_hand the value of hand could be the dictionary {'a':0, 'q':0, 'l':1, 'm':1, 'u':0, 'i':0}. I did that using for i in word: for k in hand.keys(): if i == k: hand[i] = hand.get(i, 0) - 1 return hand Is this modifying hand or not?

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!