Chapter 5: Problem 17
The following statements call a function named show_data. Which of the statements passes arguments by position, and which passes keyword arguments? a. show_data(name='Kathryn', age=25) b. show_data('Kathryn', 25)
Short Answer
Expert verified
Based on the provided information, determine which of the given statements call a function using arguments passed by position and which call a function using keyword arguments.
a) show_data(name='Kathryn', age=25)
b) show_data('Kathryn', 25)
Answer: Statement (a) calls a function using keyword arguments, while statement (b) calls a function using arguments passed by position.