Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d109536

Browse files
Add tarot_card_reader.py
1 parent a8ea1bb commit d109536

File tree

1 file changed

+177
-0
lines changed

1 file changed

+177
-0
lines changed

‎Tarot Reader/tarot_card_reader.py‎

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
import random
2+
3+
4+
# tarot deck of 78 cards and 'predictions'
5+
tarot_deck = [
6+
"The Fool: \n\tExperience is your best teacher",
7+
"The Magician: \n\tLife is Magic... do you control yours?",
8+
"The High Priestess: \n\tStay away from worldly affairs",
9+
"The Empress: \n\tThe world bows before you, you bow to none",
10+
"The Emperor: \n\tThe world bows before you, you bow to none",
11+
"The Hierophant: \n\tFollow the 4rc@n3 principles",
12+
"The Lovers: \n\tI've never writ, nor no man never loved",
13+
"The Chariot: \n\tYou'll get to see your dream ride soon",
14+
"Strength: \n\tYou are stong enough",
15+
"The Hermit: \n\tThe World hurtles forward, yet you remain uncaught in its riptide",
16+
"Wheel of Fortune: \n\tYour luck today depends on whether the first living thing you see is a plant or an animal",
17+
"Justice: \n\tThe Mills of God grind slow but fine",
18+
"The Hanged Man: \n\tThat's rough buddy",
19+
"Death: \n\tLife's younger sibling brushed your shoulder just now, but you're fine- it was just lint",
20+
"Temperance: \n\tThe World needs more of it, and of you",
21+
"The Devil: \n\tGet over here so I can prove that you exist",
22+
"The Tower: \n\tExchange places with the king",
23+
"The Star: \n\tLike diamonds in the sky~",
24+
"The Moon: \n\tYou might find that your enthusiasm waxes and wanes, but that's alright",
25+
"The Sun: \n\tYou're the light of someone's life",
26+
"Judgement: \n\t*judges you in spanish*",
27+
"The World: \n\tThese hands could hold you but it'll never be enough~",
28+
"Ace of Wands: \n\tYou're a wizard, Harry",
29+
"Two of Wands: \n\tYour sibling is pretty cool",
30+
"Three of Wands: \n\tTry to avoid tournaments for the time being",
31+
"Four of Wands: \n\tFind trouble and make it double",
32+
"Five of Wands: \n\tExpecto Patronum",
33+
"Six of Wands: \n\tDraw your wand",
34+
"Seven of Wands: \n\tIf you see a noseless man with the complexion of crushed eggshells, RUN",
35+
"Eight of Wands: \n\tI'm surprised you got this tbh... I'll let you in on a secret - Seven didn't actually eat Nine",
36+
"Nine of Wands: \n\tOh, the card you're looking for is 3 quarters to the right",
37+
"Ten of Wands: \n\tOh, the card you're looking for is a quarter to the left",
38+
"Page of Wands: \n\tYou're going to be called to the Head's Office - you shouldn't have messed with alchemy unsupervised",
39+
"Knight of Wands: \n\tYou just had to buy that giant chess set, didn't you?",
40+
"Queen of Wands: \n\tWith great power...",
41+
"King of Wands: \n\tWith great power...",
42+
"Ace of Cups: \n\tIf you ever see a trophy in the middle of a hedge maze...",
43+
"Two of Cups: \n\tBottoms up, friend!",
44+
"Three of Cups: \n\tTwo's company, three's better company!",
45+
"Four of Cups: \n\tThe more the merrier!",
46+
"Five of Cups: \n\tYeah, social distancing is important",
47+
"Six of Cups: \n\tNow that's one too many",
48+
"Seven of Cups: \n\tTwo's company enough",
49+
"Eight of Cups: \n\tTake a break",
50+
"Nine of Cups: \n\tIf three's a crowd...",
51+
"Ten of Cups: \n\tStop it now",
52+
"Page of Cups: \n\tI don't think you should drive until you clear your head",
53+
"Knight of Cups: \n\tPut that sword down right this instant",
54+
"Queen of Cups: \n\tDon't offend anyone influential",
55+
"King of Cups: \n\tDon't get on your gaurdians' bad side",
56+
"Ace of Swords: \n\tDraw your sword",
57+
"Two of Swords: \n\tEn garde",
58+
"Three of Swords: \n\tAllez!",
59+
"Four of Swords: \n\tParry!",
60+
"Five of Swords: \n\tLearn enough to be dangerous",
61+
"Six of Swords: \n\tGet yourself a teacher",
62+
"Seven of Swords: \n\tParlay!",
63+
"Eight of Swords: \n\tDo something nice for a stranger",
64+
"Nine of Swords: \n\tBe chivalrous",
65+
"Ten of Swords: \n\tI'm not asking for much, just be nice",
66+
"Page of Swords: \n\tThe pen is mightier",
67+
"Knight of Swords: \n\tLive by the code you're honour-bound to follow",
68+
"Queen of Swords: \n\tPledge alliance",
69+
"King of Swords: \n\tPledge alliance",
70+
"Ace of Coins: \n\tYou now have an iron nail",
71+
"Two of Coins: \n\tFlip a coin",
72+
"Three of Coins: \n\tFor want of a nail...",
73+
"Four of Coins: \n\tYou now have a paperclip",
74+
"Five of Coins: \n\tSleep well, it is a blessing",
75+
"Six of Coins: \n\tRoll a die",
76+
"Seven of Coins: \n\tYou're a lucky one",
77+
"Eight of Coins: \n\tYou're like a pineapple tree - i.e. you're a factual error",
78+
"Nine of Coins: \n\tAccessory fruit(affectionate)",
79+
"Ten of Coins: \n\t<insert cool fruit fact here>",
80+
"Page of Coins: \n\tYou're due for a promotion soon",
81+
"Knight of Coins: \n\tTreat your subordinates",
82+
"Queen of Coins: \n\tYou're worth your weight in gold",
83+
"King of Coins: \n\tYou're worth your weight in gold"
84+
]
85+
86+
87+
def fin():
88+
print("Whichever your choice was...")
89+
input(">> press enter")
90+
print("May the cards ever be in your favour")
91+
input(">> press enter")
92+
print()
93+
print("\x1B[3mFin\x1B[23m".center(72))
94+
print("*"*72)
95+
96+
97+
def youve_chosen_yes():
98+
print("I see that you've chosen to divine your future....")
99+
input(">> press enter")
100+
print("Let's make haste then...")
101+
input(">> press enter")
102+
print("Neither fame nor fortune wait for man")
103+
input(">> press enter")
104+
print()
105+
print("You have drawn three cards")
106+
print()
107+
print("Your first card is...")
108+
pick_card1 = random.randint(0, 77)
109+
print(tarot_deck[pick_card1])
110+
input(">> press enter")
111+
print()
112+
print("Your second card is...")
113+
pick_card2 = random.randint(0, 78)
114+
print(tarot_deck[pick_card2] if pick_card2 != pick_card1 else tarot_deck[random.randint(0, 78)])
115+
input(">> press enter")
116+
print()
117+
print("And your third and final card is...")
118+
pick_card3 = random.randint(0, 78)
119+
print(tarot_deck[pick_card3] if pick_card3 != pick_card1 and pick_card3 != pick_card2 else tarot_deck[random.randint(0, 78)])
120+
input(">> press enter")
121+
print()
122+
fin()
123+
124+
125+
def youve_chosen_no():
126+
print("Are you wise...")
127+
input(">> press enter")
128+
print("Or foolish?")
129+
input(">> press enter")
130+
print("I suppose only time will tell")
131+
input(">> press enter")
132+
fin()
133+
134+
135+
def youve_chosen_neither():
136+
print("*le sigh*")
137+
input(">> press enter")
138+
print("I suppose you think this is a game...")
139+
input(">> press enter")
140+
print("You wouldn't be wrong...")
141+
input(">> press enter")
142+
print("But the only thing that you've played...")
143+
input(">> press enter")
144+
print("Is yourself.")
145+
input(">> press enter")
146+
print("\nNever gonna give you up,\nNever gonna let you down,\nNever gonna run around and desert you.\nNever gonna make you cry,\nNever gonna say goodbye,\nNever gonna tell a lie and hurt you.\n")
147+
fin()
148+
149+
150+
# Introductory text
151+
print("In this black box, you read white words")
152+
input(">> press enter")
153+
print("Words that might warn you of danger...")
154+
input(">> press enter")
155+
print("Words that might foretell great fortune...")
156+
input(">> press enter")
157+
print("Or words that might make you laugh")
158+
input(">> press enter")
159+
print()
160+
161+
162+
# Choice made here
163+
print("Do you dare draw a card?")
164+
ch = input(">> enter Y/N: ")
165+
print("\nInteresting...")
166+
167+
if ch.lower() == 'y':
168+
youve_chosen_yes()
169+
170+
elif ch.lower()=='n':
171+
print()
172+
youve_chosen_no()
173+
174+
else:
175+
print()
176+
youve_chosen_neither()
177+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /