6 odpowiedzi
+ 4
def anurag:
print("hello")
def =>define function after 😊
anurag=>function name 😊
:=>Most important 😊
print("hello")=>written statement for functions and indentation is most important 😊 if you will not give then it will give you a indentation error
This is simple function for python if you want more advanced than go and take sololearn PYTHON core course and start learning Sutharsan.S
+ 8
def <function name>:
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2285/?ref=app
+ 6
def
+ 4
If you followed the python tutorials here, you would know.
+ 1
def square(x):
print(x*x)
square(2) #function is called
square is the name of the function
def is the keyword
x is the argument that is to be passed in the function.
0
Sutharsan.S
You can define a function using def.
for more information you need to learn python.