Skillshare intro to Python/Unit 5: Difference between revisions

no edit summary
imported>Jesstess
imported>Jesstess
No edit summary
Line 103:
 
To do this, use a <code>for</code> loop to go through every word in the word list. For every letter in that word, see if that letter is contained in the rack. If it is, save the word in a <tt>valid_words</tt> list variable. Make sure you handle repeat letters: once a letter from the rack has been used, it can't be used again.
 
Hint: you will need to use a <code>for</code> loop inside of a <code>for</code> loop (the outer loop is for looping over the words, the inner loop is for looping over the letters in a word).
 
To check your work, use the <code>print</code> function to print <code>valid_words</code> after the <code>for</code> loop.
 
<b>Step 3 resources</b>:
Line 113 ⟶ 117:
</li>
</ul>
 
 
===Step 4: scoring===
Anonymous user