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

On problem set 5, somehow my implementation of play hand updates the hand, even though I am not running update_hand. Can anyone see why? I don't know what I am doing wrong. link to code:http://codepad.org/PPsHSgME line 217: update_hand disabled, but still updates letters

OpenStudy (anonymous):

If I understood correctly, your problem is that is_valid_word is doing the updating for you :-). If you don't want the function to actually update copy the hand before using hand.copy. Hope this helps.

OpenStudy (anonymous):

Thanks, I didn't remember that I updated the hand in that function. Now I can sleep again at night.

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!