about | help | code help+videos | done | prefs |
getIQ
Given a person's writing sample, estimate their IQ using the following algorithm. Sum the length of each word, multiply by 15, then divide by the number of words (truncate any fractional part). Assume words are separated by whitespace and that there is no punctuation. getIQ("i use short words") → 52 getIQ("mississippi expectations exceed extraordinary") → 157 getIQ("hello bye") → 60 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy