21 python

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 1DE
icon
Related questions
Topic Video
Question

21 python

 

Question 21
What is the output of the following?
child1 {
"name": "Emil",
"year" : 2004
}
child2 = {
"name": "Tobias",
"year" : 2007
}
myfamily = {
"child1": child 1,
"child2": child2,
}
print(myfamily)
{'name': 'Emil', 'year': 2004, 'name': 'Tobias', 'year': 2007}
{{'name': 'Emil', 'year': 2004},{'name': 'Tobias', 'year': 2007}}
{'child1': {'name': 'Emil', 'year': 2004}, 'child2': {'name': 'Tobias', 'year': 2007}}
{'child1', 'child2'}
Transcribed Image Text:Question 21 What is the output of the following? child1 { "name": "Emil", "year" : 2004 } child2 = { "name": "Tobias", "year" : 2007 } myfamily = { "child1": child 1, "child2": child2, } print(myfamily) {'name': 'Emil', 'year': 2004, 'name': 'Tobias', 'year': 2007} {{'name': 'Emil', 'year': 2004},{'name': 'Tobias', 'year': 2007}} {'child1': {'name': 'Emil', 'year': 2004}, 'child2': {'name': 'Tobias', 'year': 2007}} {'child1', 'child2'}
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT