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
Get step-by-step solutions from verified subject matter experts
