Question
2)What does a dictionary value with a key 'egg' and a value 100 look like? egg: 100 [egg, 100] {egg:100} (egg:100) 3) Which ones are
2)What does a dictionary value with a key 'egg' and a value 100 look like?
egg: 100
[egg, 100]
{egg:100}
(egg:100)
3) Which ones are examples of a mutable data type?
list, dictionary string,
integer float,
range tuple, boolean
5) If eggs contains a dictionary with the following items {'bread':1,'milk':2,'cream':4}, which code produces this output: ([1,2,4])
eggs,spam() | ||
eggs.items() | ||
eggs.keys() | ||
eggs.values() |
6)
If eggs contains a dictionary with the following items {'bread':1,'milk':2,'cream':4}, which code checks if milk is in eggs and produces the result True?
milk in eggs | ||
milk in eggs | ||
milk in eggs.keys() | ||
milk in eggs.values() |
4) If eggs contains a dictionary with the following items {'bread':1,'milk':2,'cream':4}, which code produces this output: (['bread', 'milk', 'cream'])
eggs,spam() | ||
eggs.items() | ||
eggs.keys() | ||
eggs.values() |
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