Function Return Statement - Python for Absolute Beginners Course

Published: 20 June 2022
on channel: Programming With Nick
638
33

In this Python for beginners tutorial we are going to learn the following:
How to create a Function that return a value.

In this video we are going to learn how to use the return statement in Python functions. As we said in the previous videos a Python function is just a block of code that performs a specific task. When we want to perform that task we can call that function in our Python programs, the function code will execute and then the program will continue to the next lines of code. Sometimes, when we call our functions we want to get information back from that function like an answer or a result, this is called returning a value from the function. We achieve that by using the return keyword. The return keyword returns a value from a function.
Let’s create a simple function that will perform a specific task and it will return some information when finished perfoming the task. Let’s create a function that will calculate the square of an input number and it will return the result.

#pythoncourse #pythontutorial #programmingwithnick


On this page of the site you can watch the video online Function Return Statement - Python for Absolute Beginners Course with a duration of hours minute second in good quality, which was uploaded by the user Programming With Nick 20 June 2022, share the link with friends and acquaintances, this video has already been watched 638 times on youtube and it was liked by 33 viewers. Enjoy your viewing!