print('Welcome to our scrabble game page!')
print('Scrabble is a word game in which 2-4 players score points by placing tiles, each bearing a single letter, onto a game board divided into a 15×15 grid of squares.-reference from wikipedia')
print('')
print('Please have a look at the points for each letter.')
letters = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
points = [1, 3, 3, 2, 1, 4, 2, 4, 1, 8, 5, 1, 3, 4, 1, 3, 10, 1, 1, 1, 1, 4, 4, 8, 4, 10]
letter_to_points= {key:value for key,value in zip(letters,points)}
print(letter_to_points)
print('')
letter_to_points[" "] =0

print("Now let's start!")
def score_word(word):
  point_total = 0
  for letters in word:
    point_total += letter_to_points.get(letters, 0)
  return point_total
  
print('We start with BROWNIE.')
brownie_points = score_word("BROWNIE")
player_to_words={
"player1":['BLUE', 'TENNIS', 'EXIT'], 
"Heeone":['EARTH', 'EYES', 'MACHINE'], 
"Sponge bob":['ERASER', 'BELLY', 'HUSKY'], 
"Doctor Lee":['ZAP', 'COMA', 'PERIOD']}
player_to_points ={}
print('')
print("Let's see what each of us made with letters!")
print(player_to_words)

for player, words in player_to_words.items():
  player_points=0
  for word in words:
    player_points += score_word(word) 
  player_to_points[player] = player_points
print('')
print('What score did we get?')
print(player_to_points)
print('I won!!!!!')