diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1e82ac9978..2b6d35c620 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,5 +1,8 @@ # Code owners .github/CODEOWNERS @exercism/maintainers-admin +# The code sample shown in the code check when people sign up to Exercism +docs/SIGN_UP_SNIPPET.txt @exercism/maintainers-admin + # Changes to `fetch-configlet` should be made in the `exercism/configlet` repo bin/fetch-configlet @exercism/maintainers-admin diff --git a/docs/SIGN_UP_SNIPPET.txt b/docs/SIGN_UP_SNIPPET.txt new file mode 100644 index 0000000000..19e4e30dc9 --- /dev/null +++ b/docs/SIGN_UP_SNIPPET.txt @@ -0,0 +1,10 @@ +def most_common_word(text): + counts = {} + best = "" + for word in text.lower().split(" "): + if len(word) < 3: + continue + counts[word] = counts.get(word, 0) + 1 + if counts[word] > counts.get(best, 0): + best = word + return f'"{best}" appears {counts[best]} times'