Solved

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

Question 8

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 2. What is printed on line 7?


A) The candy bar costs 95 cents
B) The candy bar costs .95 cents
C) The {name} costs {price} cents
D) The 'name:candy bar' costs 'price:95' cents

Correct Answer:

verifed

Verified

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

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents