repl.it
@nickbeattie/

Experimental probability test

Python

No description

fork
loading
Files
  • main.py
  • counters.py
main.py
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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
import random
from counters import * 
characters = ["Jake Peralta", "Charles Boyle", "Amy Santiago", "Rosa Diaz", "Terry Jeffords"]
cases = ["Illegal possession of cocaine", "50g of recreational marijuana", "Break & enter", "Car theft", "$4 000 000 stolen from jewelry store", "Hostages held in a Goodwill", "All customers held hostage in Shaw’s Bar", "Special Case: The Pontiac Bandit Strikes Again"]
times = int(input("How many times would you like to run the code? "))
for i in range(times):
  characterchoice = random.choice(characters)
  caseschoice =  random.choice(cases)
  if characterchoice == "Jake Peralta":
    spawnpoint = ["Jake Peralta's Desk", "Interrogation Room", "Elevator"]
    clothes = ["Wearing a tie", "Not wearing a tie", "Wearing his badge", "Not wearing his badge"]
    spawnpointchoice = random.choice(spawnpoint)
    clotheschoice = random.choice(clothes)
    if caseschoice == "Illegal possession of cocaine":
      CocaineCount = CocaineCount + 1
    elif caseschoice == "50g of recreational marijuana":
      MarijuanaCount = MarijuanaCount + 1
    elif caseschoice == "Break & enter":
      BandECount = BandECount + 1
    elif caseschoice == "Car theft":
      CarTheftCount = CarTheftCount + 1
    elif caseschoice == "$4 000 000 stolen from jewelry store":
      JewelryCount = JewelryCount + 1
    elif caseschoice == "Hostages held in a Goodwill":
      GoodwillCount = GoodwillCount + 1
    elif caseschoice == "All customers held hostage in Shaw's Bar":
      ShawBarCount = ShawBarCount + 1
    elif caseschoice == "Special Case: The Pontiac Bandit Strikes Again":
      PontiacBanditCount = PontiacBanditCount + 1
    if spawnpointchoice == "Jake Peralta's Desk":
      JP1 = JP1 + 1
    elif spawnpointchoice == "Interrogation Room":
      JP2 = JP2 + 1
    elif spawnpointchoice == "Elevator":
      JP3 = JP3 + 1
    if clotheschoice == "Wearing a tie":
      JPA = JPA + 1
    elif clotheschoice == "Not wearing a tie":
      JPB = JPB + 1
    elif clotheschoice == "Wearing his badge":
      JPC = JPC + 1
    elif clotheschoice == "Not wearing his badge":
      JPD = JPD + 1
    JakePeraltaCount = JakePeraltaCount + 1
  elif characterchoice == "Charles Boyle":
    spawnpoint = ["Charles Boyle's Desk", "Kitchen", "Break room"]
    clothes = ["Wearing a belt", "Not wearing a belt", "Wearing brown shoes", "Wearing black shoes" ]
    spawnpointchoice = random.choice(spawnpoint)
    clotheschoice = random.choice(clothes)
    if caseschoice == "Illegal possession of cocaine":
      CocaineCount = CocaineCount + 1
    elif caseschoice == "50g of recreational marijuana":
      MarijuanaCount = MarijuanaCount + 1
    elif caseschoice == "Break & enter":
      BandECount = BandECount + 1
    elif caseschoice == "Car theft":
      CarTheftCount = CarTheftCount + 1
    elif caseschoice == "$4 000 000 stolen from jewelry store":
      JewelryCount = JewelryCount + 1
    elif caseschoice == "Hostages held in a Goodwill":
      GoodwillCount = GoodwillCount + 1
    elif caseschoice == "All customers held hostage in Shaw's Bar":
      ShawBarCount = ShawBarCount + 1
    elif caseschoice == "Special Case: The Pontiac Bandit Strikes Again":
      PontiacBanditCount = PontiacBanditCount + 1
    if spawnpointchoice == "Charles Boyle's Desk":
      CB1 = CB1 + 1
    elif spawnpointchoice == "Kitchen":
      CB2 = CB2 + 1
    elif spawnpointchoice == "Break room":
      CB3 = CB3 + 1
    if clotheschoice == "Wearing a belt":
      CBA = CBA + 1
    elif clotheschoice == "Not wearing a belt":
      CBB = CBB + 1
    elif clotheschoice == "Wearing brown shoes":
      CBC = CBC + 1
    elif clotheschoice == "Wearing black shoes":
      CBD = CBD + 1
      PontiacBanditCount = PontiacBanditCount + 1
    CharlesBoyleCount = CharlesBoyleCount + 1 
  elif characterchoice == "Amy Santiago":
    spawnpoint = ["Amy Santiago's Desk", "Captain Holt's Office", "Briefing Room"]
    clothes = ["Wearing a black suit", "Wearing a gray suit", "Wearing a blue suit", "Wearing a pink suit"]
    spawnpointchoice = random.choice(spawnpoint)
    clotheschoice = random.choice(clothes)
    if caseschoice == "Illegal possession of cocaine":
      CocaineCount = CocaineCount + 1
    elif caseschoice == "50g of recreational marijuana":
      MarijuanaCount = MarijuanaCount + 1
    elif caseschoice == "Break & enter":
      BandECount = BandECount + 1
    elif caseschoice == "Car theft":
      CarTheftCount = CarTheftCount + 1
    elif caseschoice == "$4 000 000 stolen from jewelry store":
      JewelryCount = JewelryCount + 1
    elif caseschoice == "Hostages held in a Goodwill":
      GoodwillCount = GoodwillCount + 1
    elif caseschoice == "All customers held hostage in Shaw's Bar":
      ShawBarCount = ShawBarCount + 1
    elif caseschoice == "Special Case: The Pontiac Bandit Strikes Again":
      PontiacBanditCount = PontiacBanditCount + 1
    if spawnpointchoice == "Amy Santiago's Desk":
      AS1 = AS1 + 1
    elif spawnpointchoice == "Captain Holt's Office":
      AS2 = AS2 + 1
    elif spawnpointchoice == "Briefing Room":
      AS3 = AS3 + 1
    if clotheschoice == "Wearing a black suit":
      ASA = ASA + 1
    elif clotheschoice == "Wearing a gray suit":
      ASB = ASB + 1
    elif clotheschoice == "Wearing a blue suit":
      ASC = ASC + 1
    elif clotheschoice == "Wearing a pink suit":
      ASD = ASD + 1
      PontiacBanditCount = PontiacBanditCount + 1
    AmySantiagoCount = AmySantiagoCount + 1 
  elif characterchoice == "Rosa Diaz":
    spawnpoint = ["Rosa Diaz's Desk", "Bullpen", "Briefing Room"]
    clothes = ["Wearing a black leather jacket", "Wearing a brown leather jacket", "Wearing a black bloody leather jacket", "Not wearing a jacket"]
    spawnpointchoice = random.choice(spawnpoint)
    clotheschoice = random.choice(clothes)
    if caseschoice == "Illegal possession of cocaine":
      CocaineCount = CocaineCount + 1
    elif caseschoice == "50g of recreational marijuana":
      MarijuanaCount = MarijuanaCount + 1
    elif caseschoice == "Break & enter":
      BandECount = BandECount + 1
    elif caseschoice == "Car theft":
      CarTheftCount = CarTheftCount + 1
    elif caseschoice == "$4 000 000 stolen from jewelry store":
      JewelryCount = JewelryCount + 1
    elif caseschoice == "Hostages held in a Goodwill":
      GoodwillCount = GoodwillCount + 1
    elif caseschoice == "All customers held hostage in Shaw's Bar":
      ShawBarCount = ShawBarCount + 1
    elif caseschoice == "Special Case: The Pontiac Bandit Strikes Again":
      PontiacBanditCount = PontiacBanditCount + 1
    if spawnpointchoice == "Rosa Diaz's Desk":
      RD1 = RD1 + 1
    elif spawnpointchoice == "Bullpen":
      RD2 = RD2 + 1
    elif spawnpointchoice == "Briefing Room":
      RD3 = RD3 + 1
    if clotheschoice == "Wearing a black leather jacket":
      RDA = RDA + 1
    elif clotheschoice == "Wearing a brown leather jacket":
      RDB = RDB + 1
    elif clotheschoice == "Wearing a black bloody leather jacket":
      RDC = RDC + 1
    elif clotheschoice == "Not wearing a jacket":
      RDD = RDD + 1
    RosaDiazCount = RosaDiazCount + 1
  elif characterchoice == "Terry Jeffords":
    spawnpoint = ["Terry Jefford's Desk", "Kitchen", "Balcony"]
    clothes = ["Wearing brown suspenders", "Wearing black suspenders", "Wearing a brown shoulder holster", "Not wearing a shoulder holster"]
    spawnpointchoice = random.choice(spawnpoint)
    clotheschoice = random.choice (clothes)
    if caseschoice == "Illegal possession of cocaine":
      CocaineCount = CocaineCount + 1
    elif caseschoice == "50g of recreational marijuana":
      MarijuanaCount = MarijuanaCount + 1
    elif caseschoice == "Break & enter":
      BandECount = BandECount + 1
    elif caseschoice == "Car theft":
      CarTheftCount = CarTheftCount + 1
    elif caseschoice == "$4 000 000 stolen from jewelry store":
      JewelryCount = JewelryCount + 1
    elif caseschoice == "Hostages held in a Goodwill":
      GoodwillCount = GoodwillCount + 1
    elif caseschoice == "All customers held hostage in Shaw's Bar":
      ShawBarCount = ShawBarCount + 1
    elif caseschoice == "Special Case: The Pontiac Bandit Strikes Again":
      PontiacBanditCount = PontiacBanditCount + 1
    if spawnpointchoice == "Terry Jefford's Desk":
      TJ1 = TJ1 + 1
    elif spawnpointchoice == "Kitchen":
      TJ2 = TJ2 + 1
    elif spawnpointchoice == "Balcony":
      TJ3 = TJ3 + 1
    if clotheschoice == "Wearing brown suspenders":
      TJA = TJA + 1
    elif clotheschoice == "Wearing black suspenders":
      TJB = TJB + 1
    elif clotheschoice == "Wearing a brown shoulder holster":
      TJC = TJC + 1
    elif clotheschoice == "Not wearing a shoulder holster":
      TJD = TJD + 1
    TerryJeffordsCount = TerryJeffordsCount + 1
print()
print("CHARACTERS:")
print("Times you got Jake Peralta:", JakePeraltaCount)
print("Times you got Charles Boyle:", CharlesBoyleCount)
print("Times you got Amy Santiago:", AmySantiagoCount)
print("Times you got Rosa Diaz:", RosaDiazCount)
print("Times you got Terry Jeffords:", TerryJeffordsCount)
print()
print("CASES:")
print("Times you got Illegal possession of cocaine:", CocaineCount)
print("Times you got 50g of recreational marijuana:", MarijuanaCount)
print("Times you got Break & enter:", BandECount)
print("Times you got Car theft:", CarTheftCount)
print("Times you got $4 000 000 stolen from jewelry store:", JewelryCount)
print("Times you got Hostages held in a Goodwill:", GoodwillCount)
print("Times you got All customers held hostage in Shaw's Bar:", times - CocaineCount - MarijuanaCount - BandECount - CarTheftCount - JewelryCount - GoodwillCount - PontiacBanditCount)
print("Times you got Special Case: The Pontiac Bandit Strikes Again:", PontiacBanditCount)
print()
print("SPAWNPOINTS:")
print("Times Jake Peralta spawned at his desk:", JP1 )
print("Times Jake Peralta spawned in the interrogation room:", JP2)
print("Times Jake Peralta spawned in the elevator:", JP3)
print()
print("Times Charles Boyle spawned at his desk:", CB1)
print("Times Charles Boyle spawned in the kitchen:", CB2)
print("Times Charles Boyle spawned in the break room:", CB3)
print()
print("Times Amy Santiago spawned at her desk:", AS1)
print("Times Amy Santiago spawned in Captain Holt's office:", AS2)
print("Times Amy Santiago spawned in the briefing room:", AS3)
print()
print("Times Rosa Diaz spawned at her desk:", RD1)
print("Times Rosa Diaz spawned in the bullpen:", RD2)
print("Times Rosa Diaz spawned in the briefing room:", RD3)
print()
print("Times Terry Jeffords spawned at his desk:", TJ1)
print("Times Terry Jeffords spawned in the kitchen:", TJ2)
print("Times Terry Jeffords spawned on the balcony:", TJ3)
print()
print("CLOTHING:")
print("Times Jake Peralta wore a tie:", JPA)
print("Times Jake Peralta didn't wear a tie:", JPB)
print("Times Jake Peralta wore his badge:", JPC)
print("Times Jake Peralta didn't' wear his badge:", JPD)
print()
print("Times Charles Boyle wore a belt:", CBA)
print("Times Charles Boyle didn't wear a belt:", CBB)
print("Times Charles Boyle wore brown shoes:", CBC)
print("Times Charles Boyle wore black shoes:", CBD)
print()
print("Times Amy Santiago wore a black suit:", ASA)
print("Times Amy Santiago wore a gray suit:", ASB)
print("Times Amy Santiago wore a blue suit:", ASC)
print("Times Amy Santiago wore a pink suit:", ASD)
print()
print("Times Rosa Diaz wore a black leather jacket:", RDA)
print("Times Rosa Diaz wore a brown leather jacket:", RDB)
print("Times Rosa Diaz wore a black bloody leather jacket:", RDC)
print("Times Rosa Diaz didn't wear a leather jacket:", RDD)
print()
print("Times Terry Jeffords wore brown suspenders:", TJA)
print("Times Terry Jeffords wore black suspenders:", TJB)
print("Times Terry Jeffords wore a shoulder holster:", TJC)
print("Times Terry Jeffords didn't wear a shoulder holster:", TJD)
exit()
Fetching token
?