Using Functions in Python | Learning Python for Beginners | Code with Kylie #7
Functions are like boxes of little squirrels that take in data and do something and potentially spit out new data!
No, seriously.
In this video, I go over how to define and call a function in python. I go over the syntax necessary to define a function, and then how to run the function. I also talk about how to add parameters in the functions and then how to pass data into the function as arguments when you call it!
Parameters are the variables that you define the function with and arguments are the values that you pass into the function when you call it!
Finally, I go over how to actually return data from the function. I know many beginners typically get confused when it comes to print vs return in a function. So, I go over this difference in the video too. Hope this helps!
Functions are great for many reasons! They allow you to create your self-contained code isolated from the rest of the script, letting you break down your code into more digestible pieces! Also, when you want to reuse the same code multiple times in a script, you can wrap it in a function instead of copy and pasting! This makes editing bugs in your code easier since you don't have to find all those various places the code was pasted. You edit in one location and you're done!
#LearnToCode #PythonForBeginners
Feel free to leave any questions.
Please consider subscribing if you liked this video: www.youtube.co...
Thanks for watching everyone!
~~~~~~~~~~~~~~~~~~~~~~~~
Follow me on Instagram: / kylieyying
Follow me on Twitter: / kylieyying
Check out my website: www.kylieying.com
Пікірлер: 139
Is coding fun? Lol Rest of the beginner python series here: kzread.info/head/PLkWv3oO4kHnuKi032yRRYgyQ4kgaNp6gs Subscribe for more Python tutorials :) Follow me on insta/twitter: @kylieyying
@instaphone5542
2 жыл бұрын
I love you❤️❤️❤️💕
@tosiqueabbasi
2 жыл бұрын
I couldn't understand these functions since two days I'm kind of mess up until i watched this beautiful video by beautiful person. I'm sure I'm gonna complete whole python course like this I'm in.
Kylie, thank you. Your content is amazing. Because of you I'm actually starting to enjoy coding, and not only that, you've turned me into a better IS student, and because of that I believe I am going to do extremely well this year. Bless up
I was stuck in my quest to learn Python. Functions were particularly hard for me but Kylie explained it in such a way that I can move on now. Thank you so much Kylie.
Hey Kylie, just want to say I real appreciate your Python tutorials. I’m currently undertaking a online Python course but some of the concepts I was having difficulty understanding. I came across your Python playlist and the explanations have been excellent. I’ve learnt so much thus far. You have a real knack of teaching and breaking down core concepts extremely well. I hope you continue teaching maybe intermediate Python to follow the beginners. Thanks.
@KylieYYing
3 жыл бұрын
I love to hear that :) Im really happy I’ve helped you! I may get back to some python but in the meantime I’m doing some cool research so I figured I could talk about that!
@-.-smile
3 жыл бұрын
Kylie Ying what’s the research on?
@KylieYYing
3 жыл бұрын
Haha you’ll see in the next few videos :D
@-.-smile
3 жыл бұрын
Kylie Ying 👍🏽
@javhaasuhochir8126
2 жыл бұрын
@@-.-smile Yes I was watching many many tutorials but maaan they were just madi it extremely difficult to understand. I love you Kylie.
A natural born teacher. All the scenarios are perfect. Thx
I didn't understand loops until I watched ur video.Your video is definitely worth watching.
after so much struggle with the def function, your explanation just gave me clarity. I will stay glued to your channel, you are awesome
After many videos you finally explain to me the return function. Thank you and stay blessed.
Nice u taught me my first game and my first code in pyhton btw i am a 11 year old
@KylieYYing
4 жыл бұрын
:O wow that’s awesome!
@faehimmirza2381
3 жыл бұрын
can you help me with school?
really amazing and easy to understand. The dog example was👌. Thank you sooooooooooooooooooooo much
Hi Kylie! :) I just wanted to say that I really appreciate your content. I am a 25 year old girl who has recently discovered how fun coding is.
I am leaving this comment as a sign of gratitude..You helped me a lot❤️❤️🇧🇩🇧🇩
Love the way you relate complicated programming stuff within easy understandable examples =) You could teach other content creators to do the same as you do. It turns our lives easier (a beginner speaking). Thanks for the simplicity Kylie.
you the better Kylie thanks for all, even your CERN visit also i apprecied it
Thank you, this was the only video I could find that helped me personally.
I'm a beginner, this helps me alot , thank you so much
Thank you for such a very helpful video Kylie! You’re the best, I’ve been leaning coding at school and still struggling about functions, but the ways you taught are really easy to understand, now I understand!
Hey - Appreciate this breakdown. Have a script that I need to convert, and was very much over thinking it. Your breakdown was concise and was able to pick up the concepts with no issues. Thanks so much for sharing!
I love this series !!!
Thanks for your videos! I'm currently taking a Intro to Python class and I always look for your videos first! lol
I love how easily you explain things! thank you!!
Thnx for the example , made things clear for me ❤❤❤❤
Your lesson explanations are so clear and your dog is so sweet as same as you... So really love you as same as your pretty dog ❤❤❤
Very simple to understand, thank you.
I like your analogies, doggo and squirrels are helpful.
You're such a great explainer! I'm starting to actually **get** coding. I never thought I could. Thanks a lot and I hope you make more content. *Subscribes*
Great teaching video! Concepts are explained extremely well.
Thank you Kylie! ☺️ this made my module way easier to understand
wow! you are such a good teacher
Excellent lesson! Thank you so much. You are a great teacher.
Thank you Kylie I like how you explain code stuff, great work 👍
It was totally wholesome Python course that I 've ever seen. Never failed to entertain us even while explaining important topics and yet it's the best part about you 🙌🏻. Btw, the photo frames were really cute tho 😆
Hi Kyile , lesson is so clear and you dog is so sweet like you...
wow! I feel like a dummy... The return expansion just solved my errors for my first time using functions 😅 TY!
ur content is very good...ur way to understand is excellent.....btw i like Dieffenbachia in ur behind
you are awesome! like your attitude to have fun!
Great work and explanations, thanks a lot. God bless you
You are amazing! Thank you for creating such great content and making it so fun easy to understand!! BTW, all of my functions will be named Jesse from now on lol
Thanks for video! keep it up.
I am fun to learn the python thanks to kylie for your explicit explanitation
Clear illustration, thanks
lovely series Kylie, keep the good work !!!
Great Vid. Simple and easy to understand. Keep the videos coming:)
Sometimes it's cringe but you still make me understand so yeah thank you
Am so crazy about you.. 🤗.. Keep going am Always with you..
was watching your videos very entertaining lol
This was really helpful!
Watching 7th video about Functions and all the creators are copying each other. Calling, defining, I'm sure you all are great Py specialists and I learned all this by heart as I have great visual memory but WHY and WHEN or what's the purpose of them I have no idea. I Need to see the the visual result result
Yeaaah, i like u. And i need to learn fuctions (sticker crying...) Thanks Kylie
Great teacher
Your dog is too lovely😍😘💖💕
thx a lot Kylie 🤗🤗🤗
Thank you for the video.
very cool thanks!
Your videos are really great. Learned a lot from you. Why don't you make more videos about python and problem solving. Thanks a lot for your videos.
Very nice , I like that
Im still confused, either im not understanding the explanation method or i am just weak. I have very basic Pascal experience non GUI stuff. I just dont get Return still.
great video kylie
I’m currently learning python . Stuck with knowing how to find two large numbers without using a list . I’m using for loops . But I’m stuck with setting it up . I’m probably overthinking it . So far Input(“Enter 7 numbers:”)
I LOVELY this intro hahaha :D
seems fun thanx to you:)maybe the examples can be less confusing...
Nice tutss .. thumbs up dear ...
I appreciate the squirrel drawings =]
Kylie, thank you. Your content is amazing.
In one point in my program when using a function with print i will get the following: at 0x7f79d0635f70. What does this mean?
Hi Kylie, just stumbled upon your channel when you made a Noughts and Crosses AI. I am studying my final year at University and am trying to understand Machine Learning. Just out of curiosity, what's your favourite programming language, I assume it's Python.
@KylieYYing
3 жыл бұрын
Yeah Python.. for now 😬
thank you so much❣❣❣❣❣❣
You are doing great! I'm going to watch, comment and like everything you ever put out there. some ideas that you may run with for coming tutorials: 1.Like someone other commented: Increasing font size would be great. 2. Adding some historical context or funny anecdotes could be a nice hack to spice it up. F.ex you could talk a little about the guy who invented python, who came up with the idea of functions(if possible to trace..) etc or anything related to coding and the topic you present. Putting things in historical perspective is always interesting! Keep going, girl, may you succeed in whatever you do in life
obrigado minha linda otimo conteudo
Your good. Subbed
Thanks,
crushing continuously on 0:00-0:11
I wasnt expecting you to be the dog haha
I wonder if the word fungible is related to functions. 🤔
Will you be doing a video explaining scopes in detail?
@KylieYYing
4 жыл бұрын
Not in my current plans, since I think that once you start practicing coding projects, it becomes fairly intuitive. I may consider it in the future though.
@pronglebot
4 жыл бұрын
@Kylie Ying i understand thank you, yeah it does become intuitive, i just wanted to know if you were gonna do one on that topic haha, great videos tho jesse is super cute
great job kylie! Thanks for the video, bdw i'm planning to take udemy complete python bootcamp 2020 course. Will it be worth it?
@sanskarrawat
4 жыл бұрын
No, it's not worth it. Every single thing they will teach you might find on KZread with a lot better understanding.
@RONYHAZARIKA
4 жыл бұрын
@@sanskarrawat Then which website is better with a course price same as udemy?
@sanskarrawat
4 жыл бұрын
@@RONYHAZARIKA bro it depends on why are you learning python for CP or web or any other. Till date everything which I have learnt in python was from free material. If you can tell me why are you learning so I might suggest a better platform for u!
@KylieYYing
4 жыл бұрын
Honestly I don’t know too much about paid online python classes. When I started coding I did stuff on codecademy and edx/mit ocw. Honestly I think most basic material is not worth paying for. KZread and other platforms have a bunch of great lessons that you could learn from! Just because a course makes you pay doesn’t mean it’s better than a free one ;) I would say just learn the basics online and practice making other scripts! After I’m done with my beginner series I’ll start some other tutorials :)
@RONYHAZARIKA
4 жыл бұрын
@@KylieYYing great ! please make in depth videos about GUI with projects. Thank u..
I was wondering if you could write a function named after my pet…..his name is Brandon.
Wat's your editor?
😀👍🏿
@jweb3
2 жыл бұрын
kylie, you are good. are you a python developer?do you have web site? i also saw your 8 project talk incl binary search
WOw!
🥰
Will you do a vid on classes?
@KylieYYing
4 жыл бұрын
Yep! I think that'll be my next one
@getoverhere4465
4 жыл бұрын
Kylie Ying Nice. I still struggle with it a bit and am trying to do a project with Tkinter using them
@KylieYYing
4 жыл бұрын
Is there anything specific that you struggle with?
@getoverhere4465
4 жыл бұрын
Kylie Ying I guess for one, I sometimes see people have the class itself use parameters instead of the init function inside of it and wondered what the difference was. Or knowing when to write all the code in the main program and when to relegate everything to classes and functions. Side note, I also don’t completely understand what the purpose of “if__name__==main” is
@getoverhere4465
4 жыл бұрын
Kylie Ying I’m 38 and am self-teaching
good job, kindly increase the font size next time
@KylieYYing
4 жыл бұрын
thanks for the feedback!
can come to singapore teach me python and come to SP Poly
I love you
i love you lol
gr8
Al piu de alda python della Funzioni al tutti.
I focused on your face haha
Next time zoom in in screen and focus at just the code and the run to be more clear
#you are amazingly beautiful and talented .Jessie
Funny
Reply: to hello beautiful peoples-> Hello beautiful Kylie, how are you getting funnier day by day,
Coding can never be fun 😭😭
who said coding is fun hmm tha't why i am talking alone that's why i ain't sleep 1 hour a day ? coding is easy when u tell for non tech people i am gonna die soon bye i don't wanna learn data structre and algorithm
@jathebest2835
Жыл бұрын
What do you imply.. Do you mean you actually like coding but wanna refute your interest..?
May Allah guide you to paradise
You are really so cute
its beautiful to see beautiful Woman doing beautiful things :D
Is coding fun?....you're kidding, right?
You are so fucking cute