@@ -22,9 +22,13 @@ by NSUCEC R&D on august 2019
2222
2323## Class-2 Assignment:
2424``` python
25- nominated = {2000: ['Stephen Daldry', 'Ang Lee', 'Steven Soderbergh', 'Ridley Scott', 'Steven Soderbergh'], 2001: ['Ridley Scott', 'Robert Altman', 'Peter Jackson', 'David Lynch', 'Ron Howard'], 2002: ['Rob Marshall', 'Martin Scorsese', 'Stephen Daldry', 'Pedro Almodovar', 'Roman Polanski'], 2003: ['Fernando Meirelles', 'Sofia Coppola', 'Peter Weir', 'Clint Eastwood', 'Peter Jackson'], 2004: ['Martin Scorsese', 'Taylor Hackford', 'Alexander Payne', 'Mike Leigh', 'Clint Eastwood'], 2005: ['Ang Lee', 'Bennett Miller', 'Paul Haggis', 'George Clooney', 'Steven Spielberg'], 2006: ['Alejandro Gonzaalez Inarritu', 'Clint Eastwood', 'Stephen Frears', 'Paul Greengrass', 'Martin Scorsese'], 2007: ['Julian Schnabel', 'Jason Reitman', 'Tony Gilroy', 'Paul Thomas Anderson', 'Joel Coen', 'Ethan Coen'], 2008: ['David Fincher', 'Ron Howard', 'Gus Van Sant', 'Stephen Daldry', 'Danny Boyle'], 2009: ['James Cameron', 'Quentin Tarantino', 'Lee Daniels', 'Jason Reitman', 'Kathryn Bigelow'], 2010: ['Darren Aronofsky', 'David O. Russell', 'David Fincher', 'Ethan Coen', 'Joel Coen', 'Tom Hooper’]}
25+ nominated = {
26+ 2000: ['Stephen Daldry', 'Ang Lee', 'Steven Soderbergh', 'Ridley Scott', 'Steven Soderbergh'], 2001: ['Ridley Scott', 'Robert Altman', 'Peter Jackson', 'David Lynch', 'Ron Howard'], 2002: ['Rob Marshall', 'Martin Scorsese', 'Stephen Daldry', 'Pedro Almodovar', 'Roman Polanski'], 2003: ['Fernando Meirelles', 'Sofia Coppola', 'Peter Weir', 'Clint Eastwood', 'Peter Jackson'], 2004: ['Martin Scorsese', 'Taylor Hackford', 'Alexander Payne', 'Mike Leigh', 'Clint Eastwood'], 2005: ['Ang Lee', 'Bennett Miller', 'Paul Haggis', 'George Clooney', 'Steven Spielberg'], 2006: ['Alejandro Gonzaalez Inarritu', 'Clint Eastwood', 'Stephen Frears', 'Paul Greengrass', 'Martin Scorsese'], 2007: ['Julian Schnabel', 'Jason Reitman', 'Tony Gilroy', 'Paul Thomas Anderson', 'Joel Coen', 'Ethan Coen'], 2008: ['David Fincher', 'Ron Howard', 'Gus Van Sant', 'Stephen Daldry', 'Danny Boyle'], 2009: ['James Cameron', 'Quentin Tarantino', 'Lee Daniels', 'Jason Reitman', 'Kathryn Bigelow'], 2010: ['Darren Aronofsky', 'David O. Russell', 'David Fincher', 'Ethan Coen', 'Joel Coen', 'Tom Hooper']
27+ }
28+ winners = {
29+ 2000 : [' Steven Soderbergh' ], 2001 : [' Ron Howard' ], 2002 : [' Roman Polanski' ], 2003 : [' Peter Jackson' ], 2004 : [' Clint Eastwood' ], 2005 : [' Ang Lee' ], 2006 : [' Martin Scorsese' ], 2007 : [' Ethan Coen' , ' Joel Coen' ], 2008 : [' Danny Boyle' ], 2009 : [' Kathryn Bigelow' ], 2010 : [' Tom Hooper' ]
30+ }
2631
27- winners = {2000 : [' Steven Soderbergh' ], 2001 : [' Ron Howard' ], 2002 : [' Roman Polanski' ], 2003 : [' Peter Jackson' ], 2004 : [' Clint Eastwood' ], 2005 : [' Ang Lee' ], 2006 : [' Martin Scorsese' ], 2007 : [' Ethan Coen' , ' Joel Coen' ], 2008 : [' Danny Boyle' ], 2009 : [' Kathryn Bigelow' ], 2010 : [' Tom Hooper’]}
2832```
29331.** Create a dictionary that includes the count of Oscar nominations for each director in the nominations list.**
30342.** Provide a dictionary with the count of Oscar wins for each director in the winners list.**
@@ -61,7 +65,7 @@ winners = {
6165
6266# ## 1A: Create dictionary with the count of Oscar nominations for each director
6367nom_count_dict = {}
64- # Add your code here
68+
6569for year, name in nominated.items():
6670 for director in name:
6771 if director not in nom_count_dict:
@@ -74,7 +78,7 @@ print("nom_count_dict = {}\n".format(nom_count_dict))
7478
7579# ## 1B: Create dictionary with the count of Oscar wins for each director
7680win_count_dict = {}
77- # Add your code here
81+
7882for year, name in winners.items():
7983 for director in name:
8084 if director not in win_count_dict:
0 commit comments