Question 3 Write a python script that starts by defining two lists… Question 3Write a python script that starts by defining two lists list1=[‘cats’, ‘dogs’, ‘shark’,’fish’] and list2 = [‘canary’, ‘parrot’, ‘cockatoo’,’lovebird’] and asking the user for two inputs ind1 and ind2. Your code is supposed to swap the element that has index ind1 in list1 with the element that has ind2 in list2 then print out both lists after swapping For example, If the user enter ind1 as 2 and ind2 as 1, your script should result in the following prints statements [‘cats’, ‘dogs’, ‘parrot’,’fish’] [‘canary’, ‘shark’, ‘cockatoo’,’lovebird’]Question 4Given the following dictionary:In[]:inventory = { ‘gold’ : 500, ‘pouch’ : [‘flint’, ‘twine’, ‘gemstone’], ‘backpack’ : [‘xylophone’,’dagger’, ‘bedroll’,’bread loaf’]}Try to do the followings:Add a key to inventory called ‘pocket’.make the value of ‘pocket’ to be a list consisting of the strings ‘seashell’, ‘strange berry’, and ‘lint’.sort()the items in the list stored under the ‘backpack’ key.Then .remove(‘dagger’) from the list of items stored under the ‘backpack’ key.Add 50 to the amount stored under the ‘gold’ key.Show the final dictionaryComputer ScienceEngineering & TechnologyPython Programming COMPUTER PYTHON
solved : Question 3 Write a python script that starts by defining two
How it works
- Paste your instructions in the instructions box. You can also attach an instructions file
- Select the writer category, deadline, education level and review the instructionsÂ
- Make a payment for the order to be assigned to a writer
- Â Download the paper after the writer uploads itÂ
Will the writer plagiarize my essay?
You will get a plagiarism-free paper and you can get an originality report upon request.
Is this service safe?
All the personal information is confidential and we have 100% safe payment methods. We also guarantee good grades
LET THE PROFESSIONALS WRITE YOUR PAPER!