nerdexam
Python_Institute

PCEP-30-02 · Question #391

Assuming that the phonc_dir dictionary contains name number pairs, arrange the code boxes to create a valid line of code which retrieves Martin Eden's phone number, and assigns it to the number…

number = phone_dir["Martin Eden"]

Module 4: Functions, Tuples, Dictionaries, and Data Processing

Question

Assuming that the phonc_dir dictionary contains name number pairs, arrange the code boxes to create a valid line of code which retrieves Martin Eden's phone number, and assigns it to the number variable.

Explanation

number = phone_dir["Martin Eden"]

Topics

#dictionary lookup#key access#variable assignment

Community Discussion

No community discussion yet for this question.

Full PCEP-30-02 Practice