Skillshare intro to Python/Unit 5: Difference between revisions

imported>Jesstess
No edit summary
imported>Jesstess
Line 121:
===Step 4: scoring===
 
WriteOnce thewe codehave toa determinelist theof Scrabblevalid scoreswords, forwe eachneed validto word, usingget the Scrabble scores dictionaryfor fromeach aboveword.
 
Use the <code>scores</code> dictionary to determine the Scrabble scores for each valid word. To do this, use a <code>for</code> loop to go through each word in <code>valid_words</code>. For each word, use a counter to keep track of the score so far for the word. Then use another <code>for</code> loop to go through the word letter by letter; look up each letter in the <code>scores</code> dictionary and adding the point value for that letter to the counter.
 
To check your work, use the <code>print</code> function to print each word in <code>valid_words</code> and its Scrabble value.
 
<b>Step 4 resources</b>:
Anonymous user