 Let's look at the average function that we wrote in a previous video. It has two parameters, and it returns their average. When we call the function, the returned value becomes the value of the expression. Because this function returns a value, we call it a value-returning function. Another name for this type of function is a fruitful function. Let's look at another way of writing this function. Notice that there's no return in this version. Here's the rest of the program that uses that function. It takes the parameters, but it doesn't give any value back. Instead, it displays the value to the screen as a side effect. A function that doesn't return a value is called a void function. Here's a program that uses both these functions. We call the value-returning function, store its value, and then print it. Then we call the second void function, which does the printing within the function. When we run the program, they produce the same output. So, which one is better? In this case, the value-returning function is preferable. Let's examine why. First, the void function always prints with two decimal places. If I were to change my numbers, let's say to 3.472 and 7.919, with the value-returning function, I can change the output to have four decimal places. The caller of the function gets to decide how it's printed out. Whereas, in print average, it will always give me two decimal places no matter what. Another advantage of the value-returning function is that I can use it if I want to find the sum of two averages. For example, I can say, average sum becomes the average of 3.7 and 4.2, plus the average of 4 and 8.5, and then I can print that result, and that works. But I can't do the same thing with print average. I cannot say print average 3.7, 4.2, plus print average of 4 and 8.5, because there's no return values to be added. As you'll see when we try to run the program, and we get a type error, in general, you should write value-returning functions because they are more flexible. You should write void functions when the side effect is your goal. That, in fact, is what the print function does. It's a void function. It doesn't give you back a value to use in further calculations. We only love print because it does side effects. And that's the main content of this video. Feel free to stop watching now, or continue with the next part, which gives a non-vital but interesting bit of information. When I said that print average doesn't give any value back, that wasn't really true. It turns out that Python functions always return a value. When we call this function, Python returns the special value, none. But since we aren't assigning it to anything, the value gets thrown away. Let's see what happens if you do try assigning the return value from a void function. We'll have print average, and make it part of an assignment. And then see what we get. The 5.65 was produced by the print in print average, and the return to value that we printed was none.