RUVIDEO
Поделитесь видео 🙏

How to Code PYTHON: *Create Functions in Python*

Let's get started! ??? In this video, we will write a few PYTHON ? scripts to demonstrate how to define and use functions ♻️. In the examples, we define a simple function then ? call the function, accept one to more input parameters in a function, and accept an optional input parameter in a function. In this tutorial, you will learn some basics in less than 10 minutes!

In this video, you will learn how to:
★ 0:09 When to use a function?
★ 0:20 Create a function
★ 1:31 Create a function that accepts an input parameter
★ 3:01 Create a function that accepts an optional input parameter
★ 4:10 Create a function that accepts multiple input parameters

Tips and Tricks:
► Functions help encapsulate functionality in one place, compose your program, update your code, and add new features. Create a function to:
• Keep your program understandable: Each function should contain a single task or responsibility. Keeping functions short and focused helps.
• Keep your program manageable: Using a good name for each function.
• Keep your program more easily written: Call functions as needed from a main function in your app's logic.
• Keep parts of your program reusable: Use the function multiple times, and update it in one spot.
► A function contains five parts:
1. The def keyword.
2. A function name.
3. A pair of parentheses symbols (()) with input parameters are defined within them.
4. A colon symbol (:) to end the function's signature.
5. A code block below the signature, which is the body of the function that runs when the function is called.
► Make an input parameter optional by supplying a default value that is used if the caller doesn't pass an argument.
► Each pair of parameters can be separated with a comma symbol (,).
► The value None can be used when defining the default value for an input parameter.
► None is the perfect way to represent a value that doesn't exist.

WANT MORE PYTHON TUTORIALS?
? Python Coding for Beginners:
https://www.youtube.com/playlist?list=PLYnuuwG097TxI0viOUfWD7sx_D_wRsGbo

For the setup, please read the followings before you begin:
1. Download latest Python: https://www.python.org/downloads/
2. Install Python and remember to select "Add Python... to PATH" when asked.
3. Download and install latest Visual Studio Code: https://code.visualstudio.com/Download
4. Install the Python extension for Visual Studio Code: Go to View and select Extensions, or select the Extensions icon, then search for python.

Python - a programming language used by world-class companies such as Amazon.com, Alphabet (Google), Facebook, Twitter, and NASA.

? SUBSCRIBE TO CODING WITH KIDS ?????? YOUTUBE CHANNEL NOW ?
https://www.youtube.com/channel/UCsPTo-vWxs0uBa2ZdPd9Y_Q?sub_confirmation=1

#CodingWithKids #PythonProgramming #PythonForBeginners

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «How to Code PYTHON: *Create Functions in Python*», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.