Python Tutorial for Beginners 8: Functions
HTML-код
- Опубликовано: 1 июл 2024
- In this Python Beginner Tutorial, we will begin learning how to write functions. Functions are one of the most important things to learn in Python Programming and will take us to the next level. We will learn how to create/define functions, how to pass in arguments, and also how to return values. Let's get started.
The code from this video can be found at:
github.com/CoreyMSchafer/code...
Watch the full Python Beginner Series here:
• Python Programming Beg...
Scope Video: • Python Tutorial: Varia...
✅ Support My Channel Through Patreon:
/ coreyms
✅ Become a Channel Member:
/ @coreyms
✅ One-Time Contribution Through PayPal:
goo.gl/649HFY
✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot
✅ Corey's Public Amazon Wishlist
a.co/inIyro1
✅ Equipment I Use and Books I Recommend:
www.amazon.com/shop/coreyschafer
▶️ You Can Find Me On:
My Website - coreyms.com/
My Second Channel - / coreymschafer
Facebook - / coreymschafer
Twitter - / coreymschafer
Instagram - / coreymschafer
#Python
Never thought I'd be binge watching Python tutorials
Same! For FA!😪
We lived the same life
@@justindominic4831 the fuck are you on about. Are you admitting to a crime?
@@YouLittleBrick may be promoting his website, which literally don't work like it's supposed to
@@YouLittleBrick r u even learing programming why are u saying such as bad word in this here
been here for 7 seconds, already better than my college professor. don't waste money on a class for this.
pretty funny
Yes i too agree with you @Alex L
exactly why I look for these videos. I pay money to RUclips search everything.
Yes! "an executed function is equal to the RETURN value" brilliant! Finally somebody explained this to me! CodeAcademy failed to explain this, as well as other youtube channels. SUBBD
I have seen many tutorials about functions and all of them failed at explaining how a function works
Agreed. Return was very confusing for me and if someone had just said that at the beginning it would have made it easy to understand.
Yeah, same here. This guy was pretty good at explaining everything.
what software do I have to download to code on that?
I know the frustration of it and immediately I'm thankful to those videos where I got it and the ones where I didn't get it. What is most important is you now have it
Your teachings are thorough. Your teachings are complete, precise. Your teachings dispel confusions and brings-in clarity. So much of sincerity and totality in your commitment to teaching is visible in each of your video! I must applaud you. Take a bow... Mr. Corey!
Fully agree
Truest comment on RUclips
His classes are best so far.
I find that sometimes certain truths/knowledge are assumed. For example, 7.33 - 7.36... "i'll just pass this in with a '.format' "...I was lost.
THE MOST NERDY COMMENT IVE BEVER SEEN XD
I love that your videos are FAST paced, CLEAR with no idle chatter and with QUICK examples that show every aspect of what you are teaching. Of all the Python tutorials, yours are the best. :)
Thanks!
this is what I call padding, they did it so they can monetize the video with minimum info.
very professional, no "umm"ing, direct, concise, each point logically builds upon the last. Very impressed. I am progressively working my way through all of your videos. Thank you!
what software do I have to download to code on that?
@@otakuhigh8788 His first videos go over that. He's using Sublime Text.
how are you now
@@otakuhigh8788 use pycharm
@@otakuhigh8788 There are various IDEs and text editors which you can use to code in Python like Sublime Text, Pycharm, Spyder, Notepad++.. each of them has their own pros and cons..
just finished this 20 min lecture in 1 hour , your each word contains so many information that is way beyond the expectations ,
Thanks a lot Sir for teaching function
Who else is watching this in 2020? I've learned more from you than any of my professors during my college experience! Keep up the great work!!!
I can't thank you enough for how straight forward learning python has been since watching your tutorials from the very beginning. Thank you for posting these awesome tutorials. I wish i could provide more support to your channel other than liking and subscribing but once my finances improve, you will definitely be my first patreon subscription.
Thanks!
I've never used Python before in my life, let alone functions in Python. This explanation made everything clear as day. Thanks!
2019 , I'm watching this and enjoyed it . Thank you Corey. That was thorough and awesome .
My mind is clear and peaceful after watch this lesson. Finally i can understand others tutorials better.
Thanks for explaining functions in details. I needed this for long time.
I will forever be grateful about that
I've spent so much time trying to understand functions and you are the only one that has explained it clear enough for me to understand. Thanks for this!
Corey, I'm working my way through your Python Programming Beginner Tutorials playlist. I just want to stop and say I'm so grateful that I found your videos. In addition to clearly having a deep knowledge of Python (and programming in general), you are *such* an incredibly gifted and skilled teacher. Thank you for putting such care into these videos and making them free to anyone who wishes to learn. You are making STEM more inclusive and accessible for everyone, and frankly that makes you The Man.
I'm glad I got to see this video. Cleared my difficulties with functions
The so long confusion about args and kwargs ended here . Crystal Clear explanation. Thanks Corey :)
I was needing to know more about *args and **kwargs, thanks for helping and explain this arguments
I thoroughly recommend having an IDE open alongside to code along with the tutorial. Really helps learn. I find by just watching a Python video I barely retain any of it.
This is great! I am new to Python and by just reading the book for my class I was having a hard time, but after this video I have gained a better grasp on how it all works! Thank you!!
the only tutorial which made me learn functions right !
thanx...
Glad it helped!
Bro same here. So much clarity now. Thanks Corey.
@@coreyms /yoER tHe beSt
Yes this has made things seem much more clear.
@@coreyms thanks for sharing your knowledge. It helped me a lot
Hi Corey, I’m learning Python and my lecture has a habit of making simple things hard, I’ve watched two of your videos and been able to get up to date, and you have managed to give me more depth and detail in 30 minutes where as I have had 2 hour classes and come out confused. Keep the videos coming they are a real benefit to people new to Python.
This is how a beginner's course should be. Fast, clear and straight to the point with no new or confusing stuff that leaves one hanging. People would pay for your videos on a source like UDEMY and as a person living in a country with no online payment possibility I seriously appreciate you work. And the fact that it's actually an Englishman teaching the course is just cherry on top. Cheers Mr.Schafer.
def stands for "define", Thanks for the tutorials best on RUclips ;)
seriously man you're the best. NO BS and fast..
Best Python lessons on the whole RUclips so far. Thank you!
The way the leap year is defined is beautiful. I would never be able to write that in such a clean way!
Definitely better than most Python tutorials on RUclips. Your description of the leap year function was very clear.
Thank you, Corey. Every time I search on something about python, I hope I find a tutorial from you. You are the best.
its amazing how i was able to pick up these concepts of functions and the various arguments *args and **kwargs, and really understand it. your explanations and examples are really good
Thank you. I watched 2 other videos on functions and it didn't 'click' until I watched yours. Wrote my code and it ran successfully! Re-wrote it a different way and that also works.
This is probabely the best Python tutorial I've ever watched. Thank you so much.
yes
Video paused at 12:29, *mouth opened, *eyes popped, #MINDBLOWN at how you make this simplified.
Thank you so much. Prolly gonna binge-watch your videos all weekend.
Great tutorials. You manage to explain everything so well unlike some other courses!
Your tutorial is very helpful for beginners, they are very structured and easy to follow, and thorough! thank you so much i hope to learn more from you!
Your style of teaching is absolutetly great. Similar to Andrew Ng from Stanford University. Clear and elaborated. Thank you for uploading this.
Do you understand his Chinese accent? >
Awesome you have it all, you are the Best Teacher I ever had! Thank you, Mr. Corey
the most explicit tutorial that i ever see!!! you did a very good job sir!
Crisp, solid and well paced explanations. These videos are a godsend, thank you for making these.
Wonderful. Before I watch this video i check almost all the website but finally I watch yours and its explained me so easy and clearly.
Thanks for your teaching.
I'm a manual tester for more than 5 years now and I'm planning to transition to automated testing. I found your videos and I immediately got drawn to them. You're awesome! After finishing all of these, I hope I can start with learning Selenium Webdriver using Python. Thank you very much!
hi herald, how is manual tester as a career?
Thanks a lot Corey!, I'm getting more confident in understanding Python, by watching your videos. Your explanation are excellent and very much in detail.
This is by far the best python tutorial I’ve seen. Thanks and great work!
finally I understood what the purpose of these stars is :D Thank you!
1 min on youtube > 7weeks in college :)
Bro, I feel that. I've got a program due tonight that I'm speed running
GoJoshua007 hit those gold splits boii
To be honest I thought I was the only one facing this kind of issues at the university. I don´t know what is happening in fact, but I have a strong feeeling that the root reason of all these things is the way they usually teaching the subject. Most of them are stucked and they think they don´t need to chage their mind, because they are professor. Ancient mind to solve nowadays problems doesn´t work!!!
Yes bro..! You are correct..!
Your tutorials are amazing! Thank you for all of your job!
The is_leap & days_in_month is one of the most beautiful examples of defining a function.
Thank you Corey for sharing this.
I scroll only to find others comment the exact thing I feel. It's good to know that the feeling is mutual. Your videos truly are the only Python videos worth watching on this site. People actually understand what's going on. Keep up the great work!
This part right here, especially the meaning of 'return' is a point I often got stuck on during my previous attemps at learning python. But I understand it incredibly clearly right now.
The way you explained function was amazing, props to you!!
Bro, I watched several tutorials but no one dived into args and kward before at this point except you. This channel should be saved at any price
This is a true gem. Thanks Corey.
Great, clear, and concise video. Thanks!
Thank you. Liked your video and subscribed your channel. I see that almost all mentioned about your excellent teaching method which I completely agree, and also your voice quality brings the much needed assurance that 'you can learn to code too', very few seem to notice this. Thank you once again.
Thanks Corey, I am progressing in Python, and I am loving it, every minute of the teaching. And because of your teaching I am loving Python too.
Please make some competitive programming in Python too, if time permits.
Best video about Functions on RUclips. Very helpful and it clicked straight away. Subbing now.
From someone who has digged many yt videos about how functions work, you nailed it
00:00 def intro
07:00 passing arguments
10:27 args & kwargs
15:01 example
thanks for the help!
thnx man
Hi
Thank you so much Sir,
your tutorials are awesome. I had to recheck if am subscribed because I cannot imagine missing any videos.
I am getting every concent in black and white.
Thank you Corey for your time and effort. Keep spreading the knowledge.
Thanks a lot for such detailed video about function !!!
Everything explained in details and depth with simple to understand.
I loved the explanation of *args and **kargs. hoping if u could make a vid on how a python experience guy understands new things or what happens in their minds (how they understand things and read Python codes) when a new version of Python releases or any module to understand its function and bring that to use for projects.
Liked, subbed, turned on notifications! I finally understand functions a lot better now, thanks to the way you approached the subject in this video! Thank you, you're amazing!
The best channel I ever found for self learning coding, it is just great!
Sir, excellent tutorial. Thank you.
I love how easy you make it. My teacher couldn't completly explain what is the difference between "return" and "print" in functions. Like here I got it right away.
subbed ofc
The most satiating and complete tutorial on youtube. You are the best..
OMG, dude you are freaking amazing. Your friends are lucky to know you. Subscribed!
thanks for this i completly forgot how to use the def function you reminded me great vid dude
wish i had a tuter like you. you are a great teacher 👍
comfortable learning experience! I have watched dozens of coding youtuber and you are the first one who teaches *args and **kwargs in the function part.
I liked the example at the end, it was very helpful.
The explanation is so simple yet effective.
Instantly subbed after watching one of your videos. This is the best Puthon channel I've seen. Keep up your Great work
Thanks!
6 years later and I am glad I found your tutorial. My professor needs to come intern for you to learn how to teach Python.
The best explanation I have found, and it is free! Thank you sir
One of the things I appreciate is you help us understand the little nuances - like the difference between printing "hello_function()" and "hello_function". I always wondered why I should have the brackets at the end.
Thank you!
Is the function name with out parentheses like a C pointer to an instantiated version of the function, or something like that?
@@edmel144 From how I understand it, writing the function without parentheses is a reference to the function itself as an object (as opposed to calling the function for use). Therefore, printing the function without the parentheses gives details about the function object, its location in memory etc.
That's how I understand it.
I feel like you could explain toothpaste leaving a tube and it'd be articulate and sound cool. Thanks a lot for this video, it's helped me a lot.
Best tutorials for simple reason:
topic is nailed by explaining core of the concept and proving an example that needs a 'light-bulb' in order to be solved
wow!!!😯 Man, your explanation is really above the average.
you are so descriptive in these tutorials , love it
Really enjoyed this video, thanks for making these tutorials
You explain much more detail than Mike's video, I have so many question after I watched his video.
! You teach in style!!. Thanks great man!
One of the best explanations Ive seen so far easily
Corey , always been a fan and your channel is helping me a lot . I just have one thing to ask can you make some videos in which you discuss some standard practice questions and some great projects ; that would be very helpful . Again thanks a lot !
Really amanzingly explained!! Congrats and Thank you for your noticeable effort
Such a nice way to teach ...Cleared all the confusion regarding UDF .. Thanks a lot
Thanks a lot Mr. Corey Schafer. Your video's very helpful and helped me out more than my college professor.
Finally Understood Functions!!
Thanks mate
Thank you! I was confused about my code but you've helped me fix it :)
You're the best tutor ever sir, believe it. Your work is much appreciated sir
Awesome Python function video, thanks!
It is very hard to get nice teachers like Corey Schafer in ordinary schools; mostly we got a bunch of mediocrity services in many schools including some that are very expensive. Mostly I have learnt many of computer applications, hardware and programming skills thru self learning using beautiful skills from nice people like Corey;
They can explain something in 21 minutes and you learn everything that could take you a year and half without understanding while in many schools.
kudos Corey; keep it up.
Very informative and exciting. Thanks
I don't just to leave comments, but I had having troubles with this syntax for a week and I just crossed with you videos now and everything start to get clear, thanks a lot!!!!
Glad to hear!
Thank you Corey, you make learning really easy!
Your explanations were simple. Subscribed. Thank you Schafer!.
I was not understanding functions, but this video was so helpful. Thank you a lot.
OMG!! ty sooo much i have been working on my code cause of an error for 5 hours and u legit solved it in 5 sec ilysm :DD
I am from Egypt and I enjoyed your explanation and learned from the video🔥