-
Notifications
You must be signed in to change notification settings - Fork 298
Expand file tree
/
Copy pathbuild.py
More file actions
45 lines (24 loc) · 947 Bytes
/
Copy pathbuild.py
File metadata and controls
45 lines (24 loc) · 947 Bytes
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
# %load q06_bowled_players/build.py
# Default Imports
from greyatomlib.python_getting_started.q01_read_data.build import read_data
data = read_data()
# Your Solution
def bowled_out(data=data):
# Write your code here
bowled_players = []
return bowled_players
# %load q06_bowled_players/build.py
# Default Imports
from greyatomlib.python_getting_started.q01_read_data.build import read_data
data = read_data()
# Your Solution
def bowled_out(data=data):
# Write your code here
bowled_players = []
deliveries = data['innings'][1]['2nd innings']['deliveries']
for delivery in deliveries:
for key in delivery:
run_variable = delivery[key]
if 'wicket' in run_variable and run_variable['wicket']['kind'] == 'bowled':
bowled_players.append(run_variable['batsman'])
return bowled_players