Problem set 3 I'm working on this: http://pastebin.com/RwMRZzWr Specifically, I'm working on the 'play_hand' function. I'm trying to put all the functions I have into a workable game. The game is scrabble, btw. I'm trying to create a loop that runs as long as a hand exists. The hand is a dictionary (keys are letters and values are # of instances), and for each word submitted, the letters are deleted from the dictionary. How do I write a statement basically saying "while 'hand' has any value > 1, do this"? Thanks in advance!
at line 234 you set n = len(hand) Can you just use while n > 1 at that point if you update n each time you play a word? I think some combination like while (n > 1) and (word != '.') would likely do the trick
kudos bwCA. Worked perfectly. Appreciate the help :)
Join our real-time social learning platform and learn together with your friends!