From cc68a8de3f780a54612b56b8674bbc8a1421f45a Mon Sep 17 00:00:00 2001 From: avdeshmishra0214 Date: Sun, 2 Sep 2018 11:24:14 +0000 Subject: [PATCH 1/4] Done --- q01_read_data/build.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/q01_read_data/build.py b/q01_read_data/build.py index e13d2f74..2b71da63 100644 --- a/q01_read_data/build.py +++ b/q01_read_data/build.py @@ -1,12 +1,10 @@ +# %load q01_read_data/build.py import yaml def read_data(): + with open('./data/ipl_match.yaml', 'r') as f: + data = yaml.load(f) + return data - # import the csv file into `data` variable - # You can use this path to access the CSV file: '../data/ipl_match.yaml' - # Write your code here - data = - # return data variable - return data From 352359dbbb0b1fc78611debe3189fc1ea024577e Mon Sep 17 00:00:00 2001 From: avdeshmishra0214 <42688800+avdeshmishra0214@users.noreply.github.com> Date: Mon, 3 Sep 2018 10:11:34 +0000 Subject: [PATCH 2/4] Create python_assignment --- python_assignment | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 python_assignment diff --git a/python_assignment b/python_assignment new file mode 100644 index 00000000..c6466457 --- /dev/null +++ b/python_assignment @@ -0,0 +1,2 @@ +# Get the sum of even numbers between 1 and 151 exluding first 7 even numbers +sum_even_btwn_1to151=sum(map(lambda (k,v):v,filter((lambda (k,v):(k > 6)),list(enumerate(map(lambda b:b**2,(filter((lambda a:a%2==0),range(1,151))))))))) From 7c0183e07e2880a3df1e84c43368e840bb6aabf1 Mon Sep 17 00:00:00 2001 From: avdeshmishra0214 Date: Sun, 9 Sep 2018 11:09:00 +0000 Subject: [PATCH 3/4] Done --- q02_teams/build.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/q02_teams/build.py b/q02_teams/build.py index 3cf9d3cf..7548f5a0 100644 --- a/q02_teams/build.py +++ b/q02_teams/build.py @@ -1,11 +1,11 @@ +# %load q02_teams/build.py # default imports from greyatomlib.python_getting_started.q01_read_data.build import read_data -data = read_data() - +#data = read_data() # solution -def teams(data=data): +def teams(data): + teams = data['info']['teams'] + return teams + - # write your code here - #teams = - return teams From b9312b05b2c52167ce7871089177987aa9060b1c Mon Sep 17 00:00:00 2001 From: avdeshmishra0214 Date: Sun, 9 Sep 2018 11:24:37 +0000 Subject: [PATCH 4/4] Done --- q03_first_batsman/build.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/q03_first_batsman/build.py b/q03_first_batsman/build.py index 84984081..06208715 100644 --- a/q03_first_batsman/build.py +++ b/q03_first_batsman/build.py @@ -1,13 +1,11 @@ +# %load q03_first_batsman/build.py # Default Imports from greyatomlib.python_getting_started.q01_read_data.build import read_data data = read_data() - # Your Solution def first_batsman(data=data): - - # Write your code here - + name = data['innings'][0]['1st innings']['deliveries'][0][0.1]['batsman'] + return name - return name