Important Notice:

Course Content
The Calendar Module
Library Function/Predefined Functions
0/4
Sys Module
Library Function/Predefined Functions
0/2
OS Module
Library Function/Predefined Functions
0/2
Functions in Python (Chapter-10) M3-R5
About Lesson

return statement:-

                  return statement का use calling function को value return करने के लिए किया जाता है called function से exit होने पर execution control calling function को transfer कर दिया जाता है return एक keyword है जिसे function की body में कहीं भी लगाया जा सकता है।

def add():

    a=int(input(“Enter first number “))

    b=int(input(“Enter second number “))

    c=a+b

    return c

res=add()

print(“Addition is = “,res)

  1. wap to find factorial of given number using return statement.

 

return statement:-

                 The return statement is used to return the value to the calling function. Upon exit from the called function, the execution control is transferred to the calling function. Return is a keyword which can be used anywhere in the body of the function.

def add():

    a=int(input(“Enter first number “))

    b=int(input(“Enter second number “))

    c=a+b

    return c

res=add()

print(“Addition is = “,res)

  1. wap to find factorial of given number using return statement.
error: Content is protected !!