Computer Science
Write the term suitable for following descriptions :
(a) A name inside the parentheses of a function header that can receive a value.
(b) An argument passed to a specific parameter using the parameter name.
(c) A value passed to a function parameter.
(d) A value assigned to a parameter name in the function header.
(e) A value assigned to a parameter name in the function call.
(f) A name defined outside all function definitions.
(g) A variable created inside a function body.
Python Functions
16 Likes
Answer
(a) Parameter
(b) Keyword argument
(c) Argument
(d) Default value
(e) Keyword argument
(f) Global variable
(g) Local variable
Answered By
6 Likes
Related Questions
What is the difference between local and global variable ?
When is global statement used ? Why is its use not recommended ?
What do you understand by local and global scope of variables ? How can you access a global variable inside the function, if function has a variable with same name.
What are the errors in following codes ? Correct the code and predict output :
total = 0; def sum(arg1, arg2): total = arg1 + arg2; print("Total :", total) return total; sum(10, 20); print("Total :", total)