reworked these examples a bit based on feedback in class
[wordplay-cdsw-solutions] / README.md
1 ## Worked Solutions to Wordplay Coding Challenges
2
3 This repo contains worked solutions to the problems in the Wordplay section of
4 the Community Data Science Workshops at the University of Washington. More
5 details on the CDSW are available at:
6
7 http://wiki.communitydata.cc/CDSW
8
9 ### Challenges about finding words:
10
11 1. Find all words that start with 'a' and are 9 or more letters long.
12
13 2. What is the longest word that starts with a 'q'?
14
15 3. Find all words that end with 'nge'
16
17 4. You need a word to match the phrase "a\*\*e\*y".  Are there any words that
18    match?
19
20 5. Print *every other* word that matches the condition in (1) above.
21
22 6. Find the longest string where no character is used > 1 time.
23
24 ### Incorporate Points
25
26 Now we're going to start finding points! You can use scrabble.scores to get the
27 scores for every letter.  But we're going to cheat: assume you have all the
28 letters.
29
30 7. What is the most valuable word in the dictionary, and how much is it worth?
31
32 8. You want to match a word that starts with an 'a', has an 'e' in the 4th
33    slot, and is no more than 7 characters long. What is the best word you can
34    play?
35
36 9. Make a list that shows the most valuable word that starts with each letter.
37    For example:
38
39 <pre>a: apophthegmatize, 37
40 c: chiquichiquis, 41
41 b: bezzazzes, 47
42 e: embezzlements, 37
43 d: decitizenizing, 36
44 .....</pre>
45
46
47 ### Wordplay Project Ideas
48
49 The [Wordplay wiki page](http://wiki.communitydata.cc/Wordplay) also include
50 several ideas for projects. These are listed as idea\_1.py, etc. in the
51 directory:
52
53 1. Find and print the words that start with "ee".
54 2. Find and print the words that end in "mt". How about "gry"?
55 3. Find and print the longest word that has no vowels.
56 4. Find an print the words that contain 4 or more 'l's.
57 5. Find and print the words that have all 5 vowels in alphabetical order.

Benjamin Mako Hill || Want to submit a patch?