def play_hand(hand, word_list):
hand
Totalscore=0
while calculate_handlen(hand)>0:
print "current hand ", display_hand(hand)
choice=raw_input('Enter word, or a "." to indicate that you are finished: ')
while choice not in word_list and is_valid_word(choice,hand,word_list)==False:
choice=raw_input("Enter another word,")
if choice=='.':
break
if choice=='.':
break
if is_valid_word(choice, hand, word_list)==True:
Totalscore+=get_word_score(choice,calculate_handlen(hand))
print 'The word', choice, 'earned ',get_word_score(choice,calculate_handlen(hand))
print 'Total Score: ', Totalscore
hand=update_hand(hand,choice)