Multiple choice technology platforms and products

What arguments enable you to specify an argument for a particular parameter by associating the argument with the parameter's name rather than with the parameter's position in the parameter list?

  1. Optional arguments

  2. Named arguments

  3. Positional Parameters

  4. None of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Named arguments allow you to specify arguments by parameter name rather than position. For example, instead of calling Method(1, 2), you can write Method(value1: 1, value2: 2), making the code more readable and allowing you to skip optional parameters. Optional arguments are parameters with default values, positional parameters are the traditional positional approach, and named arguments specifically refer to the name-association feature.