Create a new dictionary called quantities using {} format like.
Complete the following:
quantities = {} quantities["baskets"] = (4, 2.49) quantities["boxes"] = (2, 1.95) quantities["bags"] = (5, 1.29) quantities["crates"] = (3, 5.99) print(quantities) for item, data in quantities.items(): print("baskets:", data[0]) count = 0 total_cost = 0 for item, data in quantities.items(): count += data[0] total_cost += data[0] * data[1] print(count) print(total_cost)
Get Answers For Free
Most questions answered within 1 hours.