-
-
Save zadvorsky/0643b0fe520e9e7b94d4b543f20e27c1 to your computer and use it in GitHub Desktop.
SFPC Code Words #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import choice | |
verbs = [ | |
'choose', 'print', 'compile', | |
'delete', 'iterate', 'format', | |
'do not fail', 'obey', 'conform to constraints', | |
'do not care', 'copy', | |
'process', 'execute', 'randomize', | |
'control', 'create', 'access', 'halt' | |
] | |
verbCount = len(verbs) | |
lastVerb = '' | |
def spliceVerb(): | |
verb = choice(verbs) | |
verbs.remove(verb) | |
return verb | |
for i in range(verbCount + 2): | |
if i == 0: | |
verb0 = 'think' | |
verb1 = 'am' | |
else: | |
verb0 = lastVerb | |
verb1 = 'think' if len(verbs) == 0 else spliceVerb() | |
lastVerb = verb1 | |
print('I {}, therefore I {}.'.format(verb0, verb1), end='\n\n') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I think, therefore I am. | |
I am, therefore I access. | |
I access, therefore I choose. | |
I choose, therefore I compile. | |
I compile, therefore I conform to constraints. | |
I conform to constraints, therefore I control. | |
I control, therefore I copy. | |
I copy, therefore I create. | |
I create, therefore I delete. | |
I delete, therefore I do not care. | |
I do not care, therefore I do not fail. | |
I do not fail, therefore I execute. | |
I execute, therefore I format. | |
I format, therefore I halt. | |
I halt, therefore I iterate. | |
I iterate, therefore I obey. | |
I obey, therefore I print. | |
I print, therefore I process. | |
I process, therefore I process. | |
I process, therefore I randomize. | |
I randomize, therefore I think. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment