Editing Wordplay
From CommunityData
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 3: | Line 3: | ||
You are filling out a crossword and need a word that fits the pattern E*G****R. What are your options? How many words have all 5 vowels in order? What's the only common English word that ends in 'mt'? What are the most possible points you can score with an English word in Scrabble? | You are filling out a crossword and need a word that fits the pattern E*G****R. What are your options? How many words have all 5 vowels in order? What's the only common English word that ends in 'mt'? What are the most possible points you can score with an English word in Scrabble? | ||
Use Python to answer questions like this instantly while practicing manipulating data from a file and | Use Python to answer questions like this instantly while practicing manipulating data from a file and regular expressions. | ||
==Setup== | ==Setup== | ||
Download the following file: | Download the file following file: http://mako.cc/teaching/2015/community_data_science/wordplay.zip | ||
Once you have downloaded the file, extract the contents of the file into a folder on your desktop. | Once you have downloaded the file, extract the contents of the file into a folder on your desktop. | ||
==Handout== | |||
[[Wordplay handout]]: goals and cheat sheet. | [[Wordplay handout]]: goals and cheat sheet. | ||
==Goals== | ==Goals== | ||
* Have fun using Python to cheat at Scrabble and crosswords. | * Have fun using Python to cheat at Scrabble and crosswords. | ||
* Practice using lists | * Practice using lists and manipulating strings. | ||
==Ideas for exercises== | ==Ideas for exercises== | ||
Line 28: | Line 27: | ||
* Find an print the words that contain 4 or more 'l's. | * Find an print the words that contain 4 or more 'l's. | ||
* Find and print the words that have all 5 vowels in alphabetical order. | * Find and print the words that have all 5 vowels in alphabetical order. | ||
* Look for other interesting properties of English words in | * Look for other interesting properties of English words in http://en.wikipedia.org/wiki/English_words_with_uncommon_properties and write code to find the words that have these properties. | ||