-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsillycalculator.py
More file actions
235 lines (223 loc) · 5.35 KB
/
sillycalculator.py
File metadata and controls
235 lines (223 loc) · 5.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
import re
from operator import add, sub, mul, truediv
import random
import pyttsx3
engine = pyttsx3.init()
engine.setProperty("rate", 150)
column1 = [
"artless",
"bawdy",
"beslubbering",
"bootless",
"churlish",
"cockered",
"clouted",
"craven",
"currish",
"dankish",
"dissembling",
"droning",
"errant",
"fawning",
"fobbing",
"forward",
"frothy",
"gleeking",
"goatish",
"gorbellied",
"impertinent",
"infectious",
"jarring",
"loggerheaded",
"lumpish",
"mammering",
"mangled",
"mewling",
"paunchy",
"pribbling",
"puking",
"puny",
"qualling",
"rank",
"reeky",
"roguish",
"ruttish",
"saucy",
"spleeny",
"spongy",
"surly",
"tottering",
"unmuzzled",
"vain",
"venomed",
"villainous",
"warped",
"wayward",
"weedy",
"yeast",
]
column2 = [
"base-court",
"bat-fowling",
"beef-witted",
"beetle-headed",
"boil-brained",
"clapper-clawed",
"clay-brained",
"common-kissing",
"crook-pated",
"dismal-dreaming",
"dizzy-eyed",
"doghearted",
"dread-bolted",
"earth-vexing",
"elf-skinned",
"fat-kidneyed",
"fen-sucked",
"flap-mouthed",
"fly-bitten",
"folly-fallen",
"fool-born",
"full-gorged",
"guts-griping",
"half-faced",
"hasty-witted",
"hedge-born",
"hell-hated",
"idle-headed",
"ill-breeding",
"ill-nurtured",
"knotty-pated",
"milk-livered",
"motley-minded",
"onion-eyed",
"plume-plucked",
"pottle-deep",
"pox-marked",
"reeling-ripe",
"rough-hewn",
"rude-growing",
"rump-fed",
"shard-borne",
"sheep-biting",
"spur-galled",
"swag-bellied",
"tardy-gaited",
"tickle-brained",
"toad-spotted",
"unchin-snouted",
"weather-bitten",
]
column3 = [
"apple-john",
"baggage",
"barnacle",
"bladder",
"boar-pig",
"bugbear",
"bum-bailey",
"canker-blossom",
"clack-dish",
"clotpole",
"coxcomb",
"codpiece",
"death-token",
"dewberry",
"flap-dragon",
"flax-wench",
"flirt-gill",
"foot-licker",
"fustilarian",
"giglet",
"gudgeon",
"haggard",
"harpy",
"hedge-pig",
"horn-beast",
"hugger-mugger",
"joithead",
"lewdster",
"lout",
"maggot-pie",
"malt-worm",
"mammet",
"measle",
"minnow",
"miscreant",
"moldwarp",
"mumble-news",
"nut-hook",
"pigeon-egg",
"pignut",
"puttock",
"pumpion",
"ratsbane",
"scut",
"skainsmate",
"strumpet",
"varlot",
"vassal",
"whey-face",
"wagtail",
]
typenum = "type a number"
operator_insults = [
"literally so stupid, type an operator(+,-,*,/)",
"Did you go to school? type an operator(+,-,*,/)",
"lacking brain matter i see, type an operator(+,-,*,/)",
"you stupid? try typing an operator(+,-,*,/)",
"are you pretending to be dense? type an operator(+,-,*,/)",
"actually dimmer than a broken lightbulb, type an operator(+,-,*,/)",
"soo very braindead, type an operator(+,-,*,/)",
"feel a bit scatterbrained? type an operator(+,-,*,/)",
"a newborn baby has more intelligence, type an operator(+,-,*,/)",
"you are a waste of oxygen, type an operator(+,-,*,/)",
"you are a waste of space, type an operator(+,-,*,/)",
"you are a waste of carbon, type an operator(+,-,*,/)",
"you are a waste of matter, type an operator(+,-,*,/)",
"you are a waste of atoms, type an operator(+,-,*,/)",
]
def operators():
patt = re.compile("(\*|\+|-|/)")
num_patt = re.compile("\d{,10}")
nums = input("type a number: ")
while not re.fullmatch(num_patt, nums) or nums == "":
engine.say(
f"you {random.choice(column1)} {random.choice(column2)} {random.choice(column3)} {typenum}"
)
engine.runAndWait()
nums = input("type a number: ")
engine.say(nums)
engine.runAndWait()
nums2 = input("type another number if you have enough brain capacity...: ")
while not re.fullmatch(num_patt, nums2) or nums2 == "":
print(
f"you {random.choice(column1)} {random.choice(column2)} {random.choice(column3)} {typenum}"
)
nums2 = input("type a number: ")
quizin = input("what ya wanna do to the numbers?: ")
while not re.fullmatch(patt, quizin) or quizin == "":
print(f"{random.choice(operator_insults)}")
quizin = input("what ya wanna do to the numbers?: ")
if quizin == "+":
print(
f"\nyour calculation is {nums} {quizin} {nums2} which is {add(int(nums), int(nums2))}"
)
elif quizin == "-":
print(
f"\nyour calculation is {nums} {quizin} {nums2} which is {sub(int(nums), int(nums2))}"
)
elif quizin == "*":
print(
f"\nyour calculation is {nums} {quizin} {nums2} which is {mul(int(nums), int(nums2))}"
)
else:
print(
f"\nyour calculation is {nums} {quizin} {nums2} which is {round(truediv(int(nums), int(nums2)), 2)}"
)
print(
f"\nif you got this far without typing something stupid then you might have more than 2 braincells, "
f"well done. "
f"If not then you are a {random.choice(column1)} {random.choice(column2)} {random.choice(column3)}"
)
operators()