No video

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

  • @KylieYYing
    @KylieYYing4 жыл бұрын

    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

    @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.

  • @freshk4ever
    @freshk4ever2 жыл бұрын

    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

  • @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.

  • @-.-smile
    @-.-smile3 жыл бұрын

    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.

  • @decongh
    @decongh2 жыл бұрын

    A natural born teacher. All the scenarios are perfect. Thx

  • @PeaceElijah-ro8ld
    @PeaceElijah-ro8ld8 ай бұрын

    I didn't understand loops until I watched ur video.Your video is definitely worth watching.

  • @rachaeldrmarketing2945
    @rachaeldrmarketing29452 жыл бұрын

    after so much struggle with the def function, your explanation just gave me clarity. I will stay glued to your channel, you are awesome

  • @damychristo7475
    @damychristo7475 Жыл бұрын

    After many videos you finally explain to me the return function. Thank you and stay blessed.

  • @unkownnn6664
    @unkownnn66644 жыл бұрын

    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?

  • @meemahslifeinverted2199
    @meemahslifeinverted21992 жыл бұрын

    really amazing and easy to understand. The dog example was👌. Thank you sooooooooooooooooooooo much

  • @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.

  • @gmnahin
    @gmnahin2 жыл бұрын

    I am leaving this comment as a sign of gratitude..You helped me a lot❤️❤️🇧🇩🇧🇩

  • @luisgrigolon
    @luisgrigolon2 жыл бұрын

    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.

  • @emmanuelmaki9412
    @emmanuelmaki94122 жыл бұрын

    you the better Kylie thanks for all, even your CERN visit also i apprecied it

  • @christinashumpert1599
    @christinashumpert1599 Жыл бұрын

    Thank you, this was the only video I could find that helped me personally.

  • @calmmap4065
    @calmmap40652 жыл бұрын

    I'm a beginner, this helps me alot , thank you so much

  • @jintathiti3254
    @jintathiti32542 жыл бұрын

    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!

  • @mathewrtaylor
    @mathewrtaylor2 жыл бұрын

    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!

  • @orestas7054
    @orestas70544 жыл бұрын

    I love this series !!!

  • @thatDavidMota
    @thatDavidMota2 жыл бұрын

    Thanks for your videos! I'm currently taking a Intro to Python class and I always look for your videos first! lol

  • @lourdesflores4390
    @lourdesflores43902 жыл бұрын

    I love how easily you explain things! thank you!!

  • @kaisen200
    @kaisen2009 ай бұрын

    Thnx for the example , made things clear for me ❤❤❤❤

  • @olmathsworkshop2215
    @olmathsworkshop22152 жыл бұрын

    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 ❤❤❤

  • @aaronessilfie3478
    @aaronessilfie34782 жыл бұрын

    Very simple to understand, thank you.

  • @tunereclipsen
    @tunereclipsen2 жыл бұрын

    I like your analogies, doggo and squirrels are helpful.

  • @aymuwun7202
    @aymuwun72022 жыл бұрын

    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*

  • @darrellverse
    @darrellverse9 ай бұрын

    Great teaching video! Concepts are explained extremely well.

  • @joelten9499
    @joelten94992 жыл бұрын

    Thank you Kylie! ☺️ this made my module way easier to understand

  • @ohaerianthony5991
    @ohaerianthony5991 Жыл бұрын

    wow! you are such a good teacher

  • @teacherinthailan6441
    @teacherinthailan64413 жыл бұрын

    Excellent lesson! Thank you so much. You are a great teacher.

  • @dzeykop
    @dzeykop Жыл бұрын

    Thank you Kylie I like how you explain code stuff, great work 👍

  • @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 😆

  • @isuruherath7281
    @isuruherath72812 жыл бұрын

    Hi Kyile , lesson is so clear and you dog is so sweet like you...

  • @a1libot
    @a1libot3 жыл бұрын

    wow! I feel like a dummy... The return expansion just solved my errors for my first time using functions 😅 TY!

  • @AstroVista446
    @AstroVista446 Жыл бұрын

    ur content is very good...ur way to understand is excellent.....btw i like Dieffenbachia in ur behind

  • @yahelsasson5104
    @yahelsasson51042 жыл бұрын

    you are awesome! like your attitude to have fun!

  • @juanruiz910
    @juanruiz9103 жыл бұрын

    Great work and explanations, thanks a lot. God bless you

  • @armandoruiz942
    @armandoruiz9422 жыл бұрын

    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

  • @sanskarrawat
    @sanskarrawat4 жыл бұрын

    Thanks for video! keep it up.

  • @thihakoko1599
    @thihakoko15993 жыл бұрын

    I am fun to learn the python thanks to kylie for your explicit explanitation

  • @franklinizuagwu3030
    @franklinizuagwu30302 жыл бұрын

    Clear illustration, thanks

  • @mattheusmegdom
    @mattheusmegdom4 жыл бұрын

    lovely series Kylie, keep the good work !!!

  • @prateeksharma962
    @prateeksharma9624 жыл бұрын

    Great Vid. Simple and easy to understand. Keep the videos coming:)

  • @1su-xb4pw
    @1su-xb4pw10 ай бұрын

    Sometimes it's cringe but you still make me understand so yeah thank you

  • @kanakauthukam4414
    @kanakauthukam44142 жыл бұрын

    Am so crazy about you.. 🤗.. Keep going am Always with you..

  • @unique8721
    @unique87212 жыл бұрын

    was watching your videos very entertaining lol

  • @brainiceland
    @brainiceland Жыл бұрын

    This was really helpful!

  • @MM-oq1lb
    @MM-oq1lb10 ай бұрын

    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

  • @talitalmeida
    @talitalmeida2 жыл бұрын

    Yeaaah, i like u. And i need to learn fuctions (sticker crying...) Thanks Kylie

  • @kasrasharafi5007
    @kasrasharafi50072 жыл бұрын

    Great teacher

  • @ameninsanov8077
    @ameninsanov80772 жыл бұрын

    Your dog is too lovely😍😘💖💕

  • @abodalmuhisen
    @abodalmuhisen2 ай бұрын

    thx a lot Kylie 🤗🤗🤗

  • @saiusmc
    @saiusmc2 жыл бұрын

    Thank you for the video.

  • @sinabtt6869
    @sinabtt686911 ай бұрын

    very cool thanks!

  • @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.

  • @nasraldeneisa4172
    @nasraldeneisa4172 Жыл бұрын

    Very nice , I like that

  • @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.

  • @ibrahimandong1572
    @ibrahimandong15722 жыл бұрын

    great video kylie

  • @user-lt6hz7jh2p
    @user-lt6hz7jh2p2 жыл бұрын

    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:”)

  • @user-em9cv4bq6r
    @user-em9cv4bq6r Жыл бұрын

    I LOVELY this intro hahaha :D

  • @Michal15Brummer
    @Michal15Brummer2 жыл бұрын

    seems fun thanx to you:)maybe the examples can be less confusing...

  • @MathandScienceLearning
    @MathandScienceLearning3 жыл бұрын

    Nice tutss .. thumbs up dear ...

  • @lilyh4573
    @lilyh45733 жыл бұрын

    I appreciate the squirrel drawings =]

  • @Erenyeager50slk
    @Erenyeager50slk2 жыл бұрын

    Kylie, thank you. Your content is amazing.

  • @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?

  • @DavidBrit101
    @DavidBrit1013 жыл бұрын

    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 😬

  • @dreadynerdy6382
    @dreadynerdy63822 жыл бұрын

    thank you so much❣❣❣❣❣❣

  • @larslover6559
    @larslover65593 жыл бұрын

    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

  • @adrianoribeiro8214
    @adrianoribeiro82142 жыл бұрын

    obrigado minha linda otimo conteudo

  • @passportbro904
    @passportbro904 Жыл бұрын

    Your good. Subbed

  • @pcebro
    @pcebro8 ай бұрын

    Thanks,

  • @arbaazali74
    @arbaazali74 Жыл бұрын

    crushing continuously on 0:00-0:11

  • @theycallmeerikaalexa1037
    @theycallmeerikaalexa10372 ай бұрын

    I wasnt expecting you to be the dog haha

  • @111jkjk
    @111jkjk3 жыл бұрын

    I wonder if the word fungible is related to functions. 🤔

  • @pronglebot
    @pronglebot4 жыл бұрын

    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

  • @RONYHAZARIKA
    @RONYHAZARIKA4 жыл бұрын

    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 KZread 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. 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

    @RONYHAZARIKA

    4 жыл бұрын

    @@KylieYYing great ! please make in depth videos about GUI with projects. Thank u..

  • @fwily2580
    @fwily25802 жыл бұрын

    I was wondering if you could write a function named after my pet…..his name is Brandon.

  • @xaiviereanthonysalud622
    @xaiviereanthonysalud6222 жыл бұрын

    Wat's your editor?

  • @alchemiststruth8247
    @alchemiststruth82472 жыл бұрын

    😀👍🏿

  • @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

  • @mimilarbo2845
    @mimilarbo28452 жыл бұрын

    WOw!

  • @alchemiststruth8247
    @alchemiststruth82472 жыл бұрын

    🥰

  • @getoverhere4465
    @getoverhere44654 жыл бұрын

    Will you do a vid on classes?

  • @KylieYYing

    @KylieYYing

    4 жыл бұрын

    Yep! I think that'll be my next one

  • @getoverhere4465

    @getoverhere4465

    4 жыл бұрын

    Kylie Ying Nice. I still struggle with it a bit and am trying to do a project with Tkinter using them

  • @KylieYYing

    @KylieYYing

    4 жыл бұрын

    Is there anything specific that you struggle with?

  • @getoverhere4465

    @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

    @getoverhere4465

    4 жыл бұрын

    Kylie Ying I’m 38 and am self-teaching

  • @graybits4111
    @graybits41114 жыл бұрын

    good job, kindly increase the font size next time

  • @KylieYYing

    @KylieYYing

    4 жыл бұрын

    thanks for the feedback!

  • @mohamadshahzad9578
    @mohamadshahzad9578 Жыл бұрын

    can come to singapore teach me python and come to SP Poly

  • @javhaasuhochir8126
    @javhaasuhochir81262 жыл бұрын

    I love you

  • @nedalalaoui3089
    @nedalalaoui3089 Жыл бұрын

    i love you lol

  • @jitendersingh-ju8bz
    @jitendersingh-ju8bz Жыл бұрын

    gr8

  • @nat-learningacademy9210
    @nat-learningacademy92102 жыл бұрын

    Al piu de alda python della Funzioni al tutti.

  • @dondonbautista2188
    @dondonbautista21882 жыл бұрын

    I focused on your face haha

  • @neouia777
    @neouia7772 жыл бұрын

    Next time zoom in in screen and focus at just the code and the run to be more clear

  • @kimyoo2007
    @kimyoo20072 жыл бұрын

    #you are amazingly beautiful and talented .Jessie

  • @playnowgames3450
    @playnowgames34502 жыл бұрын

    Funny

  • @Divyansh-Tiwari
    @Divyansh-Tiwari4 жыл бұрын

    Reply: to hello beautiful peoples-> Hello beautiful Kylie, how are you getting funnier day by day,

  • @nournounou2957
    @nournounou2957 Жыл бұрын

    Coding can never be fun 😭😭

  • @emrandavid4851
    @emrandavid48512 жыл бұрын

    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..?

  • @yusufmiftahudeen
    @yusufmiftahudeen2 жыл бұрын

    May Allah guide you to paradise

  • @malakhassan9816
    @malakhassan98162 ай бұрын

    You are really so cute

  • @younesrabhi5298
    @younesrabhi52982 жыл бұрын

    its beautiful to see beautiful Woman doing beautiful things :D

  • @jesuisravi
    @jesuisravi2 жыл бұрын

    Is coding fun?....you're kidding, right?

  • @ronniesamaroo1775
    @ronniesamaroo17752 жыл бұрын

    You are so fucking cute