Python Coding Basics for Beginners #6 - Functions

Publicado el: 10 julio 2024
en el canal de: BruvCode
10
0

Hello, and welcome back to another Python Basics tutorials, and today, we'll be doing functions, if you're new here and want to know how to code, Please LIKE and SUBSCRIBE RIGHT NOW, because I'll be explaining everything we did in the previous tutorials such as Input and Conditional Statements, Variables and everything we did. A function is a sequence of commands that can be re-used in a program later on. It's possible to make a function. To make a function, it has to be defined first. You can make your own function like the example below this description

This is a simple function that prints hi to the person. First define it by using the `def` keyword which comes with Python by default.
```
Defining a function to print hi to the person
def print_hi(name): # Using the name parameter
print hi to the person
print("Hi", name)

Now testing the function
print_hi("Federico")

Output:
====================
Hi Federico
```

It displays "Hi" with the name entered in the parameters. You can use them for all sorts of things through out a program. You can make your own function, and use it multiple times throughout a program. Once defined, you can add required parameters if you want to, and use it. They can often work with variables, strings (text) and integers or floats.

============================================
Click to Subscribe! -    / @bruvcode  
Beginner Tutorial Series -    • Python Basics for Beginners Tutorials  

Thanks for watching!
Stay tuned: By SUBSCRIBING and ENABLING NOTIFICATIONS for new videos
LIKE this video
Any questions, suggestions or feedback, leave it in the COMMENT SECTION below
See you in the next video

SUBSCRIBE, Help me reach 10,000 SUBSCRIBERS!!


En esta página del sitio puede ver el video en línea Python Coding Basics for Beginners #6 - Functions de Duración hora minuto segunda en buena calidad , que subió el usuario BruvCode 10 julio 2024, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 10 veces y le gustó 0 a los espectadores. Disfruta viendo!