Function Return Statement - Python for Absolute Beginners Course

Опубликовано: 20 Июнь 2022
на канале: 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


На этой странице сайта вы можете посмотреть видео онлайн Function Return Statement - Python for Absolute Beginners Course длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Programming With Nick 20 Июнь 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 638 раз и оно понравилось 33 зрителям. Приятного просмотра!