【Code Gym】Python Basic Tutorial (4) - User-Defined Functions
HTML-код
- Опубликовано: 10 сен 2024
- ► Summary
In this video, we will introduce Python functions. In the previous videos, we have used print() and input(), which are all built-in functions of Python. How can we write our own functions?
Before we start writing our own functions, we need to understand why we need to do this. Because in the process of programming, we will encounter the situation of repeated writing of code. In order to improve the efficiency of code usage, we will wrap the repeatedly appearing code into a function. In the future, when we need this piece of code, we only need to write the function name. Now, let's write our own functions.
▼ Code Gym ▼
codegym.tech
#CodeGym
#Python