Monkey Typing Monkey Typing
DE ES PT-BR UK Simplified Chinese EN EL FR IT JA RU
We have prepared a set of Editor's Choice Solutions. You will see them first after you solve the mission. In order to see all other solutions you should change the filter.


A. S. 爱丁顿,《物理世界的本质》,1927。



无限猴子定理 是指让一只猴子在打字机上随机地按键,当时间无穷时,几乎必然能够打出任何给定的文字,例如 约翰·沃利斯 ... 的全套著作,也有可能是一部 的小说。

输入: 两个参数。一段文字作为字符串(str)输入,一组词汇作为一组字符串(a set of strings)输入。

输出: 文本中相关词汇的数量,整数(int)。


count_words("How aresjfhdskfhskd you?", {"how", "are", "you", "hello"}) == 3
count_words("Bananas, give me bananas!!!", {"banana", "bananas"}) == 2
count_words("Lorem ipsum dolor sit amet, consectetuer adipiscing elit.",
            {"sum", "hamlet", "infinity", "anything"}) == 1

如何应用: Python在处理文本时有用且强大。这个任务是你未来可能编写的文字搜索工具的一个简单示范。

0 < len(text) ≤ 256
all(3 ≤ len(w) and w.islower() and w.isalpha for w in words)

You should be an authorized user in order to see the full description and start solving this mission.

Become Awesome

  • No Ads
  • No Limits
  • More Content
CheckiO Extensions

CheckiO Extensions allow you to use local files to solve missions. More info in a blog post.

In order to install CheckiO client you'll need installed Python (version at least 3.8)

Install CheckiO Client first:

pip3 install checkio_client

Configure your tool

checkio --domain=py config --key=

Sync solutions into your local folder

checkio sync

(in beta testing) Launch local server so your browser can use it and sync solution between local file end extension on the fly. (doesn't work for safari)

checkio serv -d

Alternatevly, you can install Chrome extension or FF addon

checkio install-plugin
checkio install-plugin --ff
checkio install-plugin --chromium

Read more here about other functionality that the checkio client provides. Feel free to submit an issue in case of any difficulties.

<< <
> >>
exec show

Whats Next?

Free accounts will see Best CheckiO solutions with some delay.
Best Solutions will be opened in
Become Awesome and Don't wait
The next stage is ""
Will be activated in
View More Solutions Random Review Solutions Go to the next mission