how to create our own function in python! ?

0 votes
asked Aug 1, 2019 by Shivam Vats (120 points)

2 Answers

+3 votes
answered Aug 2, 2019 by anonymous
If you want to create your own functions in python. Start by writing 'def ' then give it a name and write some parameters.


def function(name):

print("your name is " + name)

+1 vote
answered Nov 19, 2019 by anonymous
def function_name (parameter):

      #write code

#call the function

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.