Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

7. suppose d = {\peter\:37, \anthony\:33}, the keys are _________. sele…

Question

  1. suppose d = {\peter\:37, \anthony\:33}, the keys are _______. select all correct responses. \peter\ 37 \anthony\ d 33 8. suppose d = {\autumn\:41, \michelle\:44}, d\autumn\ will return _______. 41 44 \autumn\ \michelle\

Explanation:

Brief Explanations

In a dictionary in programming, the keys are the elements on the left - hand side of the colon. For the dictionary d = {"peter":37, "anthony":33}, "peter" and "anthony" are keys. When accessing a value in a dictionary using the syntax d["key"], it returns the corresponding value. For d = {"autumn":41, "michelle":44}, d["autumn"] returns 41.

Answer:

  1. "peter", "anthony"
  2. 41