0
Can someone explain to me how to find the code behind functions that allow them to work.
I would like to build my own functions
1 Resposta
0
Hey Wonjae Chang ,👋
Please specify which language?
If you want create your function in Python, you shoud use 'def' keyword to define a function and then type the name of your function and insert ':' after name.
Then, for body of your function, you must use indentation.
See below example:
def func1():
print("Hello Wonjae Chang"*5)
This function nemed: func1 and show 'Hello Wonjae Chang' five times in output.this function does not any arguments.
Tip:arguments must be inserted inside the parenthesis of function.
For call your function, do this:
func1()
Also, you can see my simple function in Python at:
https://code.sololearn.com/c5IcvUR3dpKp/?ref=app