Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please I need the solution for all questions I can't post another question 4. Add 2 inches to the son's height. In [ ]: dict={son's
please I need the solution for all questions I can't post another question
4. Add 2 inches to the son's height. In [ ]: dict={"son's name": "Lucas", "son's eyes": "green", "son's height": 32, "son's weight": 25} #Type your answer below. print(dict) 5. Using items() method generate a list of tuples consisted of each key value pair. In [ ]: dict={"son's name": "Lucas", "son's eyes": "green", "son's height": 32, "son's weight": 25} #Type your answer below. ans_1= print(ans_1) 6. Using get() method print the value of 'son's eyes'. In ]: dict = {"son's name" : "Lucas", "son's eye color": "green", "son's height": 32,"son's weight": 25} #Type your answer inside the print. ans_1= print (ans_1) 7. geti method can be used just to get the value of a key. But it has more tricks up its sleeve. Try to look for key: 'son's age and if nothing comes up make the.get() return "2". C > Run Markdown 7. getd method can be used just to get the value of a key. But it has more tricks up its sleeve. Try to look for key: 'son's age' and if nothing comes up make the.get() return "2". In [ ]: dict={"son's name": "Lucas", "son's eye color": "green", "son's height": 32,"son's weight": 25} #Type your answer here. ans_1= print(ans_1) 8. Since dictionaries are mutable, they have some methods that tuples don't have. clear() is one of them and it clears the whole dictionary. In ( ): dict={"son's name": "Lucas", "son's eye color": "green", "son's height": 32, "son's weight": 25} #clear the dictionary here then print it. print(dict) 9. Using len function, find how many keys there are in the dictionary. In [ ]: dict={"son's name": "Lucas", "son's eye color": "green", "son's height": 32, "son's weight": 25} #Write your answer here. ans_1= print(ans_1) 10. What's the key with the highest value in the dictionary? In [ ]: dict={"son's name": "Lucas", "son's eye color": "green", "son's height": 32,"son's weight": 25} #Write your answer here. ans_1= print(ans_1) 11. What's the key with the lowest value in the dictionary? In [ ]: dict={"son's name": "Lucas", "son's eye color": "green", "son's height": 32, "son's weight": 25} #Write your answer here. ans_1= print(ans_1)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started