mirror of
https://github.com/RussellChamp/tilde-projects.git
synced 2026-10-28 08:32:32 +00:00
Random update of various things
This commit is contained in:
1 parent
d76dd9c674
commit
57485f6ffd
22 files changed
+269
-73
No files matched your search
+6
-1
@@ -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]
|
||||
Reference in new issue
Block a user