Computer Science
If return statement is not used inside the function, the function will return:
- 0
- None object
- an arbitrary integer
- Error! Functions in Python must have a return statement.
Python Functions
13 Likes
Answer
None object
Reason — The default return value for a function that does not return any value explicitly is None
.
Answered By
8 Likes
Related Questions
Which of the following keywords marks the beginning of the function block?
- func
- define
- def
- function
What is the area of memory called, which stores the parameters and local variables of a function call ?
- a heap
- storage area
- a stack
- an array
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