Chicago Python Workshop/Chicago Python Workshop 1/Saturday projects/Wordplay: Difference between revisions

From OpenHatch wiki
Content added Content deleted
imported>Aisha
No edit summary
imported>Codersquid
 
(4 intermediate revisions by one other user not shown)
Line 4: Line 4:
# Go over <tt>words1.py</tt> through <tt>words6.py</tt> as a class
# Go over <tt>words1.py</tt> through <tt>words6.py</tt> as a class
# Demo <tt>scrabble_cheater.py</tt>
# Demo <tt>scrabble_cheater.py</tt>
# Create fake_scrabble.py where you use scrabble_cheater as a module to return all possible words that could be placed against a letter.
# Explore other interesting word properties or play with <tt>scrabble_cheater.py</tt> (we've had people start Words With Friends games and cheat using the script)
## For this project, your script should run like this: <code>python fake_scrabble.py <RACK> <BOARD_LETTERS></code>

## You can assume that there is plenty of space between letters in BOARD_LETTERS on the board.
## You should also modify scrabble_cheater.py to return what it prints out, and put the surrounding code under a function definition.
# If you have more time
## Once you select a word, refresh the rack with new letters, and then add to the front and back letters of the word on the BOARD_LETTERS.
===Congratulations!===
===Congratulations!===



Latest revision as of 17:30, 28 November 2012

Project

  1. Review relevant material from lecture (e.g. for loops)
  2. Go over words1.py through words6.py as a class
  3. Demo scrabble_cheater.py
  4. Create fake_scrabble.py where you use scrabble_cheater as a module to return all possible words that could be placed against a letter.
    1. For this project, your script should run like this: python fake_scrabble.py <RACK> <BOARD_LETTERS>
    2. You can assume that there is plenty of space between letters in BOARD_LETTERS on the board.
    3. You should also modify scrabble_cheater.py to return what it prints out, and put the surrounding code under a function definition.
  5. If you have more time
    1. Once you select a word, refresh the rack with new letters, and then add to the front and back letters of the word on the BOARD_LETTERS.

Congratulations!

You've read, modified, and added code to a software project that makes it easy to get useful information from words. Keep practicing!