Skip to main content
The National Cipher Challenge

Reply To: Programming

A Tale of 2 Secrets Forums T.E.M.P.E.S.T. Programming Reply To: Programming

#109859
F6EXB_the_frenchy
Participant

Changing the random number generator:
By replacing “import random” with “import secrets” in the first line, then replacing “number = random.randint(1, 99)” with
“number = secrets.randbelow(100)” in line 16, the percentage is very close to the expected 42% after 1,000,000 or 10,000,000 loops.

Report a problem