Last active
March 2, 2018 04:36
-
-
Save 64lines/69b60bc6eb73800ab2ef5cf8a4e6ae2f to your computer and use it in GitHub Desktop.
The Philosopher: A program that generates philosophic quotes...
This file contains hidden or 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
################################## | |
# The Philosopher: A program that | |
# generates philosophic quotes... | |
################################# | |
import random | |
R = ["without", "under", | |
"between", "over", "on", | |
"after", "by", "because of", "next to", "on top", | |
"like", "through", "until", "from", "into", "to", "in", | |
"since"] | |
T = ["laughter", "man", "pain", | |
"building", "magic", "wealth", "water", | |
"spoon", "day", "sister", "train", | |
"pleasure", "potato", "price", "rhythm", "woman", | |
"world", "person", "theory", "problem", "bird", | |
"understanding", "control", "power", "country", "mountain"] | |
N = ["a", "any", "another", "other"] | |
M = ["wasted", "beautiful", "elegant", | |
"easy", "absolute", "careful", "abandoned", "empty", "accurate", | |
"accomplished", "authentic", "clumsy", "calm", "crazy", "creepy", | |
"enlightened"] | |
string = "S" | |
string = string.replace("S", "X V Z") \ | |
.replace("X", "Y O") \ | |
.replace("Z", "Y M") \ | |
.replace("O", "R Y") \ | |
.replace("Y", "N T") \ | |
.replace("R", random.choice(R)) \ | |
.replace("T", random.choice(T), 1) \ | |
.replace("T", random.choice(T), 1) \ | |
.replace("T", random.choice(T), 1) \ | |
.replace("N", random.choice(N), 1) \ | |
.replace("N", random.choice(N), 1) \ | |
.replace("N", random.choice(N), 1) \ | |
.replace("M", random.choice(M)) \ | |
.replace("V", "is") | |
print string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment