function in the python

technical talkiess
0

 a = 4

b=5

# inbuild function in python
# c = sum((a,b))
# print(c)


def function1():
    print("This is the function one")

# calling the function.... simple function but return none .... does not return any value
# print(function1())

# parameterizsed function in python
def function2(a,b):
    """
        this is called as a docstring ..... It is help user or developer to understanding the whats is the functinon us .... this function does not contain only 3 number addiyttion
       
    """
    n = a+b
    print(a+b)
    return n

# d= function2(4,5)
# print(d)

# accedd the docstring in the python
print(function2.__doc__)
Tags

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)