Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

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.

Example:

def function(name):

print("your name is " + name)

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

      #write code

#call the function

function_name(value)
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.
...