Computer Science
Which of the following items are present in the function header ?
- function name only
- both function name and parameter list
- parameter list only
- return value
Python Functions
1 Like
Answer
both function name and parameter list
Reason — Function header is the first line of function definition that begins with keyword def
and ends with a colon (:), specifies the name of the function and its parameters.
Answered By
3 Likes
Related Questions
Find the errors in following function definitions :
- 1.
def main() print ("hello")
- 2.
def func2(): print(2 + 3)
- 3.
def compute(): print (x * x)
- 4.
square (a) return a * a
What is the default return value for a function that does not return any value explicitly ?
- None
- int
- double
- null
Which of the following keywords marks the beginning of the function block ?
- func
- define
- def
- function
What is the name given to that area of memory, where the system stores the parameters and local variables of a function call ?
- a heap
- storage area
- a stack
- an array