Step 15: String Methods Scrabble project

Help please on Step 15 (bonus question) of Scrabble project at the end of the Python 3: String Methods lesson…

  1. For the second bonus question that asks us to define an update_point_totals() function, why do we not need to put parameters inside the ()?

  2. For the third/last bonus question, how does the code <points *= 2> know to work on each individual letter in the letters list, instead of just working on the first letter only?

Thank you.

What code have you written? Please post the formatted code.

Oh yes. I was studying the solution code that was provided. Here you go.

Code for the first question that I had:

def update_point_totals():

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


Code for the second question the I had:

letters += [
for letter
in letters
points *= 2