4 Antworten
+ 9
Consider a function, add, it takes 2 parameter x and y.
def add(x,y)
return (x+y)
This function will RETURN x+y
Example if we use it,
a=add(5,4)
Here, x=5,y=4 and add will return 5+4 .Hence the value of a will be 9(BUT it will not be printed on screen unless you give print(a) command)
+ 1
Got it!! Thanks
+ 1
thx helpful
0
def add(x, y): colon is missing sir. we should include colon while defining a function.