Help!
This project called "car data". You are working at a car dealership and store the car data in a dictionary: Your program needs to take the key as input and output the corresponding value. Sample Input: year Sample Output: 2018 The data is already defined in the code. I wrote this code: car = { 'brand':'BMW', 'year': 2018, 'color': 'red', 'mileage': 15000 } x = input() for x in car: if x == 'brand': print (car['brand']) elif x == 'year': print (car['year']) elif x == 'color': print (car['color']) elif x == 'mileage': print (car['mileage']) else: print ('Nothing!') but it turns out to be : input : brand output : BMW 2018 red 15000 Can you guys help me to edit the code above to let it meets the criteria? Thanks.