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:

Verified
Correct Answer:
Verified
Q1: The _ loop continues to perform the
Q2: Use the _ function to connect to
Q3: Case Study 2:<br>>>> with open("rainfall.txt", "r") as
Q4: Describe the functionality of the string format
Q5: What is a list comprehension?
Q7: What Python module is used to get
Q8: 1. Match each of the descriptions with
Q9: Describe JSON encoding and explain how Python
Q10: 1. Match each of the descriptions with
Q11: When using the format method with a