MCPcopy Create free account
hub / github.com/asweigart/PythonStdioGames / generateJobAutomatedHeadline

Function generateJobAutomatedHeadline

src/gamesbyexample/clickbait.py:116–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

114
115
116def generateJobAutomatedHeadline():
117 state = random.choice(STATES)
118 noun = random.choice(NOUNS)
119
120 i = random.randint(0, 2)
121 pronoun1 = POSSESIVE_PRONOUNS[i]
122 pronoun2 = PERSONAL_PRONOUNS[i]
123 if pronoun1 == 'Their':
124 return 'This {} {} Didn\'t Think Robots Would Take {} Job. {} Were Wrong.'.format(state, noun, pronoun1, pronoun2)
125 else:
126 return 'This {} {} Didn\'t Think Robots Would Take {} Job. {} Was Wrong.'.format(state, noun, pronoun1, pronoun2)
127
128
129# If the program is run (instead of imported), run the game:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected