No video

Using Functions in Python | Learning Python for Beginners | Code with Kylie #7

  Рет қаралды 61,068

Kylie Ying

Kylie Ying

4 жыл бұрын

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: kzfaq.info?sub_...
Thanks for watching everyone!
~~~~~~~~~~~~~~~~~~~~~~~~
Follow me on Instagram: / kylieyying
Follow me on Twitter: / kylieyying
Check out my website: www.kylieying.com

Пікірлер: 139
@KylieYYing
@KylieYYing 4 жыл бұрын
Is coding fun? Lol Rest of the beginner python series here: kzfaq.info/sun/PLkWv3oO4kHnuKi032yRRYgyQ4kgaNp6gs Subscribe for more Python tutorials :) Follow me on insta/twitter: @kylieyying
@instaphone5542
@instaphone5542 2 жыл бұрын
I love you❤️❤️❤️💕
@tosiqueabbasi
@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.
@rachaeldrmarketing2945
@rachaeldrmarketing2945 2 жыл бұрын
after so much struggle with the def function, your explanation just gave me clarity. I will stay glued to your channel, you are awesome
@wism3179
@wism3179 Жыл бұрын
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.
@freshk4ever
@freshk4ever 2 жыл бұрын
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
@jintathiti3254
@jintathiti3254 2 жыл бұрын
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!
@decongh
@decongh 2 жыл бұрын
A natural born teacher. All the scenarios are perfect. Thx
@orestas7054
@orestas7054 4 жыл бұрын
I love this series !!!
@damychristo7475
@damychristo7475 Жыл бұрын
After many videos you finally explain to me the return function. Thank you and stay blessed.
@lourdesflores4390
@lourdesflores4390 2 жыл бұрын
I love how easily you explain things! thank you!!
@mathewrtaylor
@mathewrtaylor 2 жыл бұрын
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!
@teacherinthailan6441
@teacherinthailan6441 3 жыл бұрын
Excellent lesson! Thank you so much. You are a great teacher.
@thatDavidMota
@thatDavidMota 2 жыл бұрын
Thanks for your videos! I'm currently taking a Intro to Python class and I always look for your videos first! lol
@kraftykoder280
@kraftykoder280 Жыл бұрын
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 😆
@dzeykop
@dzeykop Жыл бұрын
Thank you Kylie I like how you explain code stuff, great work 👍
@joelten9499
@joelten9499 2 жыл бұрын
Thank you Kylie! ☺️ this made my module way easier to understand
@christinashumpert1599
@christinashumpert1599 Жыл бұрын
Thank you, this was the only video I could find that helped me personally.
@luisgrigolon
@luisgrigolon 2 жыл бұрын
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.
@aymuwun7202
@aymuwun7202 2 жыл бұрын
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*
@olmathsworkshop2215
@olmathsworkshop2215 2 жыл бұрын
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 ❤❤❤
@meemahslifeinverted2199
@meemahslifeinverted2199 2 жыл бұрын
really amazing and easy to understand. The dog example was👌. Thank you sooooooooooooooooooooo much
@mattheusmegdom
@mattheusmegdom 3 жыл бұрын
lovely series Kylie, keep the good work !!!
@PeaceElijah-ro8ld
@PeaceElijah-ro8ld 7 ай бұрын
I didn't understand loops until I watched ur video.Your video is definitely worth watching.
@armandoruiz942
@armandoruiz942 2 жыл бұрын
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
@prateeksharma962
@prateeksharma962 4 жыл бұрын
Great Vid. Simple and easy to understand. Keep the videos coming:)
@darrellverse
@darrellverse 8 ай бұрын
Great teaching video! Concepts are explained extremely well.
@unkownnn6664
@unkownnn6664 4 жыл бұрын
Nice u taught me my first game and my first code in pyhton btw i am a 11 year old
@KylieYYing
@KylieYYing 4 жыл бұрын
:O wow that’s awesome!
@faehimmirza2381
@faehimmirza2381 3 жыл бұрын
can you help me with school?
@juanruiz910
@juanruiz910 3 жыл бұрын
Great work and explanations, thanks a lot. God bless you
@tunereclipsen
@tunereclipsen Жыл бұрын
I like your analogies, doggo and squirrels are helpful.
@gmnahin
@gmnahin 2 жыл бұрын
I am leaving this comment as a sign of gratitude..You helped me a lot❤️❤️🇧🇩🇧🇩
@aaronessilfie3478
@aaronessilfie3478 2 жыл бұрын
Very simple to understand, thank you.
@-.-smile
@-.-smile 3 жыл бұрын
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
@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
@-.-smile 3 жыл бұрын
Kylie Ying what’s the research on?
@KylieYYing
@KylieYYing 3 жыл бұрын
Haha you’ll see in the next few videos :D
@-.-smile
@-.-smile 3 жыл бұрын
Kylie Ying 👍🏽
@javhaasuhochir8126
@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.
@SuperDompan
@SuperDompan Жыл бұрын
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.
@emmanuelmaki9412
@emmanuelmaki9412 2 жыл бұрын
you the better Kylie thanks for all, even your CERN visit also i apprecied it
@AstroVista446
@AstroVista446 Жыл бұрын
ur content is very good...ur way to understand is excellent.....btw i like Dieffenbachia in ur behind
@yahelsasson5104
@yahelsasson5104 2 жыл бұрын
you are awesome! like your attitude to have fun!
@franklinizuagwu3030
@franklinizuagwu3030 2 жыл бұрын
Clear illustration, thanks
@kaisen200
@kaisen200 9 ай бұрын
Thnx for the example , made things clear for me ❤❤❤❤
@calmmap4065
@calmmap4065 2 жыл бұрын
I'm a beginner, this helps me alot , thank you so much
@thihakoko1599
@thihakoko1599 3 жыл бұрын
I am fun to learn the python thanks to kylie for your explicit explanitation
@ohaerianthony5991
@ohaerianthony5991 Жыл бұрын
wow! you are such a good teacher
@a1libot
@a1libot 3 жыл бұрын
wow! I feel like a dummy... The return expansion just solved my errors for my first time using functions 😅 TY!
@kanakauthukam4414
@kanakauthukam4414 2 жыл бұрын
Am so crazy about you.. 🤗.. Keep going am Always with you..
@sanskarrawat
@sanskarrawat 4 жыл бұрын
Thanks for video! keep it up.
@brainiceland
@brainiceland Жыл бұрын
This was really helpful!
@isuruherath7281
@isuruherath7281 2 жыл бұрын
Hi Kyile , lesson is so clear and you dog is so sweet like you...
@unique8721
@unique8721 2 жыл бұрын
was watching your videos very entertaining lol
@saiusmc
@saiusmc 2 жыл бұрын
Thank you for the video.
@kasrasharafi5007
@kasrasharafi5007 2 жыл бұрын
Great teacher
@MathandScienceLearning
@MathandScienceLearning 2 жыл бұрын
Nice tutss .. thumbs up dear ...
@ameninsanov8077
@ameninsanov8077 2 жыл бұрын
Your dog is too lovely😍😘💖💕
@sinabtt6869
@sinabtt6869 10 ай бұрын
very cool thanks!
@abodalmuhisen
@abodalmuhisen Ай бұрын
thx a lot Kylie 🤗🤗🤗
@ibrahimandong1572
@ibrahimandong1572 2 жыл бұрын
great video kylie
@nasraldeneisa4172
@nasraldeneisa4172 Жыл бұрын
Very nice , I like that
@dreadynerdy6382
@dreadynerdy6382 2 жыл бұрын
thank you so much❣❣❣❣❣❣
@lilyh4573
@lilyh4573 2 жыл бұрын
I appreciate the squirrel drawings =]
@Michal15Brummer
@Michal15Brummer 2 жыл бұрын
seems fun thanx to you:)maybe the examples can be less confusing...
@talitalmeida
@talitalmeida 2 жыл бұрын
Yeaaah, i like u. And i need to learn fuctions (sticker crying...) Thanks Kylie
@wahidibnzakir7758
@wahidibnzakir7758 Жыл бұрын
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.
@passportbro904
@passportbro904 Жыл бұрын
Your good. Subbed
@user-em9cv4bq6r
@user-em9cv4bq6r Жыл бұрын
I LOVELY this intro hahaha :D
@1su-xb4pw
@1su-xb4pw 9 ай бұрын
Sometimes it's cringe but you still make me understand so yeah thank you
@larslover6559
@larslover6559 3 жыл бұрын
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
@pcebro
@pcebro 7 ай бұрын
Thanks,
@johankarlsson7484
@johankarlsson7484 Жыл бұрын
In one point in my program when using a function with print i will get the following: at 0x7f79d0635f70. What does this mean?
@adrianoribeiro8214
@adrianoribeiro8214 2 жыл бұрын
obrigado minha linda otimo conteudo
@DavidBrit101
@DavidBrit101 3 жыл бұрын
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
@KylieYYing 3 жыл бұрын
Yeah Python.. for now 😬
@Erenyeager50slk
@Erenyeager50slk 2 жыл бұрын
Kylie, thank you. Your content is amazing.
@MM-oq1lb
@MM-oq1lb 10 ай бұрын
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
@mimilarbo2845
@mimilarbo2845 2 жыл бұрын
WOw!
@alchemiststruth8247
@alchemiststruth8247 2 жыл бұрын
🥰
@CollosalTrollge
@CollosalTrollge Жыл бұрын
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.
@alchemiststruth8247
@alchemiststruth8247 2 жыл бұрын
😀👍🏿
@jweb3
@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
@xaiviereanthonysalud622
@xaiviereanthonysalud622 2 жыл бұрын
Wat's your editor?
@111jkjk
@111jkjk 3 жыл бұрын
I wonder if the word fungible is related to functions. 🤔
@user-lt6hz7jh2p
@user-lt6hz7jh2p 2 жыл бұрын
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:”)
@theycallmeerikaalexa1037
@theycallmeerikaalexa1037 Ай бұрын
I wasnt expecting you to be the dog haha
@nedalalaoui3089
@nedalalaoui3089 Жыл бұрын
i love you lol
@affiliatepaid747
@affiliatepaid747 2 жыл бұрын
I love you
@RONYHAZARIKA
@RONYHAZARIKA 4 жыл бұрын
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
@sanskarrawat 4 жыл бұрын
No, it's not worth it. Every single thing they will teach you might find on KZfaq with a lot better understanding.
@RONYHAZARIKA
@RONYHAZARIKA 4 жыл бұрын
@@sanskarrawat Then which website is better with a course price same as udemy?
@sanskarrawat
@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
@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. KZfaq 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
@RONYHAZARIKA 4 жыл бұрын
@@KylieYYing great ! please make in depth videos about GUI with projects. Thank u..
@pronglebot
@pronglebot 4 жыл бұрын
Will you be doing a video explaining scopes in detail?
@KylieYYing
@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
@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
@jitendersingh-ju8bz
@jitendersingh-ju8bz Жыл бұрын
gr8
@arbaazali74
@arbaazali74 Жыл бұрын
crushing continuously on 0:00-0:11
@playnowgames3450
@playnowgames3450 2 жыл бұрын
Funny
@nat-learningacademy9210
@nat-learningacademy9210 Жыл бұрын
Al piu de alda python della Funzioni al tutti.
@fwily2580
@fwily2580 2 жыл бұрын
I was wondering if you could write a function named after my pet…..his name is Brandon.
@mohamadshahzad9578
@mohamadshahzad9578 Жыл бұрын
can come to singapore teach me python and come to SP Poly
@graybits4111
@graybits4111 4 жыл бұрын
good job, kindly increase the font size next time
@KylieYYing
@KylieYYing 4 жыл бұрын
thanks for the feedback!
@dondonbautista2188
@dondonbautista2188 2 жыл бұрын
I focused on your face haha
@getoverhere4465
@getoverhere4465 3 жыл бұрын
Will you do a vid on classes?
@KylieYYing
@KylieYYing 3 жыл бұрын
Yep! I think that'll be my next one
@getoverhere4465
@getoverhere4465 3 жыл бұрын
Kylie Ying Nice. I still struggle with it a bit and am trying to do a project with Tkinter using them
@KylieYYing
@KylieYYing 3 жыл бұрын
Is there anything specific that you struggle with?
@getoverhere4465
@getoverhere4465 3 жыл бұрын
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
@getoverhere4465 3 жыл бұрын
Kylie Ying I’m 38 and am self-teaching
@kimyoo2007
@kimyoo2007 2 жыл бұрын
#you are amazingly beautiful and talented .Jessie
@neouia777
@neouia777 2 жыл бұрын
Next time zoom in in screen and focus at just the code and the run to be more clear
@Divyansh-Tiwari
@Divyansh-Tiwari 4 жыл бұрын
Reply: to hello beautiful peoples-> Hello beautiful Kylie, how are you getting funnier day by day,
@malakhassan9816
@malakhassan9816 2 ай бұрын
You are really so cute
@yusufmiftahudeen
@yusufmiftahudeen 2 жыл бұрын
May Allah guide you to paradise
@nournounou2957
@nournounou2957 Жыл бұрын
Coding can never be fun 😭😭
@younesrabhi5298
@younesrabhi5298 2 жыл бұрын
its beautiful to see beautiful Woman doing beautiful things :D
@ronniesamaroo1775
@ronniesamaroo1775 Жыл бұрын
You are so fucking cute
@emrandavid4851
@emrandavid4851 2 жыл бұрын
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
@jathebest2835 Жыл бұрын
What do you imply.. Do you mean you actually like coding but wanna refute your interest..?
@jesuisravi
@jesuisravi 2 жыл бұрын
Is coding fun?....you're kidding, right?
DEFINITELY NOT HAPPENING ON MY WATCH! 😒
00:12
Laro Benz
Рет қаралды 64 МЛН
Sigma girl and soap bubbles by Secret Vlog
00:37
Secret Vlog
Рет қаралды 14 МЛН
Red❤️+Green💚=
00:38
ISSEI / いっせい
Рет қаралды 85 МЛН
Functions in Python are easy 📞
10:38
Bro Code
Рет қаралды 430 М.
Functions vs Classes: When to Use Which and Why?
10:49
ArjanCodes
Рет қаралды 149 М.
Learn Python Functions - Quick Python Project For Beginners
10:04
Python Simplified
Рет қаралды 91 М.
Python 101: Learn the 5 Must-Know Concepts
20:00
Tech With Tim
Рет қаралды 1,1 МЛН
10 Python Comprehensions You SHOULD Be Using
21:35
Tech With Tim
Рет қаралды 133 М.
3 PYTHON AUTOMATION PROJECTS FOR BEGINNERS
17:00
Internet Made Coder
Рет қаралды 1,6 МЛН
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 391 М.
List Comprehension - BEST Python feature !!! Fast and Efficient
14:51
Python Simplified
Рет қаралды 190 М.
DEFINITELY NOT HAPPENING ON MY WATCH! 😒
00:12
Laro Benz
Рет қаралды 64 МЛН