Solved

Case Study 1: 1. ≫>> Item = 'A Dozen Eggs

Question 33

Multiple Choice

Case Study 1:
1. >>> item = 'A dozen eggs'
2. >>> itemPrice = 2.4
3. >>> print("{0} costs ${1:.2f}".format(item, itemPrice) )
4. ???
5. >>> myDict = {'name':'candy bar', 'price':95}
6. >>> print("The {name} costs {price} cents".format(**myDict) )
7. ???
-Refer to the session in the accompanying Case Study 1. What is printed on line 4?


A) A dozen eggs costs $2.4
B) A dozen eggs costs $2.40
C) {0} costs $2.4f
D) The {item} costs {itemPrice} cents

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions