| about | help | code help+videos | done | prefs |
jotto_guesser
In this exercise you will program a strategy for playing the role of the guesser in a game of Jotto. The function jotto_guesser(words) is passed a list of possible words and should return the word that is the best guess. The idea is that at the start, 'words' will be the whole dictionary; then on the next turn 'words' will be the remaining words that are consistent with the guess/reply pair. There are many possible strategies; if you choose one that is different from the one we choose, you will get a different guess, even though your strategy may be just as valid. Try to get some strategy that you think works well (you can test how well it works by implementing the next exercise); then look at the hint and try to match our strategy. jotto_guesser(['alive', 'alone', 'angel', 'angle', 'armed', 'bread', 'cable', 'clean', 'dream', 'email', 'equal', 'false', 'grade', 'heard', 'lakes', 'least', 'metal', 'older', 'plays', 'rated', 'royal', 'scale', 'table', 'trade', 'value', 'wales', 'years']) → 'plays' jotto_guesser(['about', 'actor', 'among', 'banks', 'basic', 'begin', 'being', 'birds', 'block', 'blogs', 'boats', 'bonds', 'bound', 'boxes', 'brain', 'brief', 'built', 'busty', 'chain', 'chair', 'chart', 'chest', 'chief', 'clips', 'clubs', 'coast', 'comes', 'cover', 'craft', 'crash', 'crime', 'doing', 'doubt', 'drink', 'drugs', 'dutch', 'eight', 'exist', 'facts', 'faith', 'fiber', 'films', 'finds', 'folks', 'force', 'found', 'fresh', 'funds', 'giant', 'girls', 'given', 'gives', 'grant', 'graph', 'grove', 'guest', 'homes', 'horse', 'house', 'human', 'items', 'jokes', 'kinds', 'light', 'links', 'logic', 'login', 'lunch', 'magic', 'major', 'march', 'marks', 'match', 'metro', 'mouse', 'moves', 'movie', 'multi', 'noise', 'notes', 'nurse', 'often', 'opens', 'other', 'owner', 'paint', 'pants', 'parks', 'parts', 'patch', 'phone', 'piano', 'pilot', 'poker', 'pound', 'power', 'price', 'prime', 'prize', 'proud', 'prove', 'quest', 'quiet', 'quite', 'quote', 'ratio', 'roman', 'round', 'route', 'saint', 'scope', 'score', 'setup', 'sharp', 'since', 'smart', 'smoke', 'sound', 'spent', 'split', 'stone', 'store', 'story', 'sugar', 'suite', 'super', 'terms', 'thank', 'their', 'third', 'those', 'tiger', 'times', 'tones', 'tower', 'track', 'train', 'trans', 'twice', 'until', 'urban', 'views', 'vista', 'voice', 'votes', 'wants', 'watch', 'white', 'whose', 'width', 'woman', 'women', 'words', 'worse', 'wrote', 'young', 'yours', 'youth']) → 'store' jotto_guesser(['actor', 'birds', 'block', 'blogs', 'boxes', 'clubs', 'coast', 'doing', 'drugs', 'funds', 'guest', 'house', 'metro', 'mouse', 'multi', 'notes', 'often', 'other', 'pilot', 'quest', 'quiet', 'quite', 'ratio', 'setup', 'stone', 'store', 'story', 'suite', 'third', 'those', 'tones', 'tower', 'until', 'urban', 'votes', 'width', 'words', 'wrote', 'young', 'yours']) → 'those' ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 495 Post-solution available
Copyright Nick Parlante 2017 - privacy