Anonymous user
Scrabble challenge: Difference between revisions
→Breaking down the problem
imported>Jesstess |
imported>Jesstess |
||
Line 65:
</li>
</ul>
====Step 2: get the rack====
Write the code to get the Scrabble rack
Handle the case where a user forgets to supply a rack; in this case, print an error message saying they need to supply some letters. Make sure you are consistent about capitalization: if your scores dictionary is lowercase, the letters supplied by the user need to be converted to lowercase at some point before you compare them.
<b>Step 2 resources</b>:
Line 78 ⟶ 81:
Getting and checking the number of command line arguments: http://docs.python.org/library/sys.html.
</li>
<li>Converting letters to lower case: http://docs.python.org/library/stdtypes.html#str.lower</li>
</ul>
|