Computer Science
Write the term suitable for the 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 call.
(e) A name defined outside all function definitions.
(f) A variable created inside a function body.
Python Functions
1 Like
Answer
(a) Parameter
(b) Keyword argument
(c) Argument
(d) Keyword argument
(e) Global variable
(f) Local variable
Answered By
3 Likes
Related Questions
What is scope ? What is the scope resolving rule of Python ?
What is the difference between local and global variable ?
Consider the following code and write the flow of execution for this. Line numbers have been given for your reference.
1. def power(b, p): 2. y = b ** p 3. return y 4. 5. def calcSquare(x): 6. a = power(x, 2) 7. return a 8. 9. n = 5 10. result = calcSquare(n) 11. print(result)What will the following function return?
def addEm(x, y, z): print(x + y + z) x = y = z = 10