nerdexam
Python_Institute

PCEP-30-02 · Question #209

The meaning of the keyword parameter is determined by:

The correct answer is D. the argument's name specified along with its value. In Python (and similar languages), a keyword argument passes a value by explicitly naming the parameter it corresponds to - e.g., func(name="Alice") - so the function knows which parameter receives the value based on that name, making D correct. A is wrong because the value…

Question

The meaning of the keyword parameter is determined by:

Options

  • Aits value
  • Bits connection with existing variables
  • Cits position within the argument list
  • Dthe argument's name specified along with its value

How the community answered

(34 responses)
  • A
    9% (3)
  • B
    3% (1)
  • C
    12% (4)
  • D
    76% (26)

Explanation

In Python (and similar languages), a keyword argument passes a value by explicitly naming the parameter it corresponds to - e.g., func(name="Alice") - so the function knows which parameter receives the value based on that name, making D correct.

  • A is wrong because the value itself (e.g., "Alice") carries no inherent meaning about which parameter it maps to.
  • B is wrong because keyword arguments don't work by detecting existing variable names in scope; you can pass a literal string or number and it still works.
  • C is wrong because that describes positional arguments, where order determines which parameter gets which value - keyword arguments exist precisely to override positional dependency.

Memory tip: Think of keyword arguments like addressing a letter: you write the recipient's name (name=) on the envelope, so it arrives at the right destination regardless of where you place it in the pile.

Community Discussion

No community discussion yet for this question.

Full PCEP-30-02 Practice