- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
Create a Module - Python for Absolute Beginners Course
In this Python for beginners tutorial we are going to learn the following:
How to create a Python module.
How to use a Python module.
In the previous videos, we learned how to create our own functions.
In this example program, we have a function that we created in a previous video that greets the user by his or her name. We also have the add function that calculates and returns the sum of two numbers and a function that returns the name of a given month.
At the beginning of our program, we have the function definitions and then we use these functions by calling them a few times each. As you can see when I hit the run button, the program works and prints out some messages.
As our programs becomes bigger, it becomes harder to follow what is happening. So, to make our code more readable, we are going to move our function definitions into a separate file, a module. So, the first thing we need to do is to create a new file. To create a new file, we have to click on this button, and then this button to create a new file. Let’s name the new file we are going to create my_module.py. The name of the file, is the name of the module.
#pythoncourse #pythontutorial #programmingwithnick
Видео Create a Module - Python for Absolute Beginners Course канала Programming With Nick
How to create a Python module.
How to use a Python module.
In the previous videos, we learned how to create our own functions.
In this example program, we have a function that we created in a previous video that greets the user by his or her name. We also have the add function that calculates and returns the sum of two numbers and a function that returns the name of a given month.
At the beginning of our program, we have the function definitions and then we use these functions by calling them a few times each. As you can see when I hit the run button, the program works and prints out some messages.
As our programs becomes bigger, it becomes harder to follow what is happening. So, to make our code more readable, we are going to move our function definitions into a separate file, a module. So, the first thing we need to do is to create a new file. To create a new file, we have to click on this button, and then this button to create a new file. Let’s name the new file we are going to create my_module.py. The name of the file, is the name of the module.
#pythoncourse #pythontutorial #programmingwithnick
Видео Create a Module - Python for Absolute Beginners Course канала Programming With Nick
Комментарии отсутствуют
Информация о видео
23 июня 2022 г. 14:57:16
00:05:30
Другие видео канала




















