+ 2
You use print to simply print your output, and you use return when you need the function to return something for use somewhere else in the program, like another function, or a method. Example (in Python): # Function that adds 2 numbers def sum(a, b): return a + b # Print the return output of that function print(sum(1,2))
6th Mar 2018, 10:43 AM
apex137
apex137 - avatar