Curso de Python para iniciantes #07 - Funções

Want to succeed in your career and prepare for the job market? 👇🏻 ✅ Web Development Training: https://refatorando.com.br/desenvolvi... 🚀 Dive into our eBooks full of valuable insights! ✅ Ebook: How to use ChatGPT to learn programming: https://refatorando.com.br/m3m8 ✅ Ebook: How to find the best IT jobs: https://refatorando.com.br/sygl ✅ Ebook: How to stand out in IT selection processes: https://refatorando.com.br/ajnw Hey everyone, how are you all doing? Roger Santos here, and I'm happy to see you back for another video. Today in the Python for Beginners course, we're going to learn about functions in Python. You will learn: What a function is What it's for How to use it Today's lesson is very important because functions are one of the main features of Python, and you'll be using them all the time. After today, your Python code will never be the same. If you learn this concept and use it wisely, your programming will reach another level. So let's go to the PC and see what's so magical about functions. Middle Let's start by creating the folder Lesson07 and the file [app.py] to keep everything organized. Function A function is a collection of code, a bunch of code and programming logic packaged together. Imagine you go to McDonald's, you go to the cashier and order a Big Mac, you pay, the other employee calls you and gives you the Big Mac. For you, it was a super simple action: I ordered a Big Mac and received a Big Mac. Now imagine everything that happened on the other side of the counter: The attendant registered the order. The order was sent to the kitchen. The cook prepared the hamburger. Another person assembled the sandwich with all the ingredients. And another person took your sandwich. They checked if it was indeed your order. They called you. And they delivered the sandwich to you. Complex, right? The function is basically the checkout counter, where you place your order and receive the sandwich. All the other processes are the collection of code and logic inside the function. And it serves precisely to organize your code, encapsulate and abstract this complexity. The customer doesn't need to know about this process, and the main reason is reuse. If you go back there tomorrow, or anyone else orders a Big Mac, they will deliver a sandwich identical to the one you ordered today. Okay, enough philosophizing here, let's make our Big Mac in code! Share this video with more people: ▶ Subscribe to the channel: https://www.youtube.com/@Refatorando/... ▶ Follow us on Instagram:   / refatorandobr   ▶ Follow us on TikTok: tiktok.com/@refatorando ▶ Follow us on LinkedIn:   / refatorando   ▶ Email for contact: [email protected]