Ask Question
15 August, 07:45

Write a statement to add the key Tesla with value USA to car makers Modify the car maker of Fiat to Italy Sample output for the given program Acura made in Japan Fiat made in Italy Tesla made in USA 1 car makers (Acura: 3apan, iat:"tpt 3Add the key Tesla wth value USA to car nakers 4 oalfy the car meker of iat to Ita2y Your solution goes here 6 8 print (Acura nade in, carakerst'Acura1 print (Fat ade incar malcersFlat 10 oristTesla nade in, carakers'Tesla3 O O Type bere to search 8

+3
Answers (1)
  1. 15 August, 10:09
    0
    The modification code is:

    car_markers = {"Tesla":"USA", "Fiat":"Italy"} #modification code

    car_markers['Acura'] = 'Japan' #modification code

    Explanation:

    In this question the dictionary car_makers is not mention clearly. The correct dictionary of car_makers is given below:

    car_markers = {'Acura':'Japan', 'Fiat':'Egypt'} #as mention in the question

    car_markers = {"Tesla":"USA", "Fiat":"Italy"} #modification code

    car_markers['Acura'] = 'Japan' #modification code

    print ('Acura made in', car_markers['Acura']) #as mention in the question

    print ('Fiat made in', car_markers['Fiat']) #as mention in the question

    print ('Tesla made in', car_markers['Tesla']) #as mention in the question

    Following are the description of code

    Create a dictionary car_makers. In this dictionary we store 'USA' in the key value 'Tesla','Italy' in the key 'Fiat'. In the next line we store 'japan' in the key 'Acura'. Finally print the value in the respective format.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Write a statement to add the key Tesla with value USA to car makers Modify the car maker of Fiat to Italy Sample output for the given ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers