Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"

Tate Taylor

When I print this code I get ‘The Help, Tate Taylor’ printed 11 times. How do I set up a code that returns both 2011 key values??

It should read 

Enter a year between 2005 and 2016:
The Help, Tate Taylor
The Artist, Michel, Hazanavicius

movie_collection_dict = {‘2005′:’Munich, Steven Spielberg’, 

‘2006’:’The Prestige, Christopher Nolan’,

‘2006’:’The Departed, Martin Scorsese’,

‘2007’:’Into the Wild, Sean Penn’,

‘2008’:’The Dark Knight, Christopher Nolan’,

‘2009’:’Mary and Max, Adam Elliot’,

‘2010’:’The Kings Speech, Tom Hooper’,

‘2011’:’The Artist, Michel Hazanavicius’,

‘2011’:’The Help, Tate Taylor’,

‘2012’:’Argo, Ben Affleck’,

‘2013’:’12 Years a Slave, Steve McQueen’,

‘2014’:’Birdman, Alejandro G. Inarritu’,

‘2015’:’Spotlight, Tom McCarthy’,

‘2016’:’The BFG, Steven Spielberg’, 



# Build a dictionary containing the specified movie collection

for_year = True

user_input = int(input(‘Enter a year between 2005 and 2016: ‘))

while for_year:

  if user_input<2005 or user_input>2016:



    for key, value in movie_collection_dict.items():

      if value[1] == user_input:

        print(key + ‘, ‘ + (value[1]))

      for_year= False


Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"