Random update of various things

This commit is contained in:
RussellChamp committed 2016-09-07 15:58:36 +00:00
1 parent d76dd9c674
commit 57485f6ffd
22 files changed
+269 -73

No files matched your search

+6 -1
View File
@@ -4,10 +4,11 @@ import inflect
p = inflect.engine()
primes = [11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71]
obfuscate = True
def make_puzzle():
answer = 0
puzzle = random.choice(["Prove you're not a robot: ", "Are you a robot?: ", "Anti-bot check: ", "Counter-cndorphant measures: "])
puzzle = random.choice(["Prove you're not a robot: ", "Are you a robot?: ", "Anti-bot check: ", "Counter-cndorphant measures: ", "Cosnok countermeasures: "])
puzzle += random.choice(["What is", "How many is", "What do you get from", "What do you get with", "What is the value of", "Can you answer", "Can you tell me"])
puzzle += " "
roll = random.randrange(0,6)
@@ -42,4 +43,8 @@ def make_puzzle():
puzzle += "? (Answer with numbers)"
if obfuscate == True:
for _ in range(3):
idx = random.randrange(len(puzzle)-1) #get between 0 and string length
puzzle = ''.join([puzzle[0:idx], chr(random.randint(33,126)), puzzle[idx+1:]])
return [answer, puzzle]