0
i need help guys .please help me
what is the function of (return ) i don't understand it.i need a great explanation please help.and thank you.
4 Answers
+ 3
most functions take some arguments as input and compute them. the result is given via return. so that other functions or variables can use it. not all functions print to the screen/console. return delivers the output of a function.
best examples are the getter methods of objects. but to understand these you should complete the courses đ
+ 1
some functions do something and some functions do something and return a value, for example if you write something like that it would be wierd x = print() because print function basicly does something it may return a value too however if it does not return you cannot assign its result to a varible, however if you do something like that x=sqrt(9) that means x =3.0 because sqrt returns a value
0
thanks you're so nice.
0
thanks my friend you explanation it's so easy and thanks