+ 2

[CHALLENGE] Infinite Monkey Theorem

"If a Monkey is typing random letters on a typewriter, it's almost certain that it will end up writing a text like that of William Shakespeare" Let's see how long does a Python take to type "et tu brute" or any custom text. https://code.sololearn.com/cIg26oVnsQIm/?ref=app

14th Mar 2018, 9:33 PM
Aditya Rana
6 ответов
14th Mar 2018, 9:48 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 8
@aditya , in that case , U must tag it as a challenge & mention [challenge] in the heading
14th Mar 2018, 9:56 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 2
@gaurav it wasn't to advertise. it was a Challenge. I wanted to invite better logics or different methods.
14th Mar 2018, 9:55 PM
Aditya Rana
+ 1
@markus it definitely produced the string for many test cases as long as 5 letters. I won't have posted without testing, isn't it? though it would take a lot of time. obviously it is monkey hitting random letters.
14th Mar 2018, 9:58 PM
Aditya Rana
+ 1
well how was that average calculated?
15th Mar 2018, 10:12 PM
Aditya Rana
0
will never end up with the string. You are not rebouncing it to a custom function so your random seed will never change. Random module used that way is not literally random
14th Mar 2018, 9:48 PM
Markus Kaleton
Markus Kaleton - avatar