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

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ก.ย. 2024
  • 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
    @KylieYYing  4 ปีที่แล้ว +21

    Is coding fun? Lol
    Rest of the beginner python series here: th-cam.com/play/PLkWv3oO4kHnuKi032yRRYgyQ4kgaNp6gs.html
    Subscribe for more Python tutorials :)
    Follow me on insta/twitter: @kylieyying

    • @instaphone5542
      @instaphone5542 3 ปีที่แล้ว

      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.

  • @-.-smile
    @-.-smile 4 ปีที่แล้ว +7

    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  4 ปีที่แล้ว +2

      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 4 ปีที่แล้ว

      Kylie Ying what’s the research on?

    • @KylieYYing
      @KylieYYing  4 ปีที่แล้ว +2

      Haha you’ll see in the next few videos :D

    • @-.-smile
      @-.-smile 4 ปีที่แล้ว

      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.

  • @wism3179
    @wism3179 2 ปีที่แล้ว +1

    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.

  • @decongh
    @decongh 2 ปีที่แล้ว

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

  • @unkownnn6664
    @unkownnn6664 4 ปีที่แล้ว +21

    Nice u taught me my first game and my first code in pyhton btw i am a 11 year old

    • @KylieYYing
      @KylieYYing  4 ปีที่แล้ว +7

      :O wow that’s awesome!

    • @faehimmirza2381
      @faehimmirza2381 3 ปีที่แล้ว +1

      can you help me with school?

  • @luisgrigolon
    @luisgrigolon 2 ปีที่แล้ว +5

    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.

  • @PeaceElijah-ro8ld
    @PeaceElijah-ro8ld 9 หลายเดือนก่อน +1

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

  • @freshk4ever
    @freshk4ever 3 ปีที่แล้ว +14

    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

  • @aymuwun7202
    @aymuwun7202 2 ปีที่แล้ว +1

    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*

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

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

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

  • @calmmap4065
    @calmmap4065 2 ปีที่แล้ว

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

  • @emmanuelmaki9412
    @emmanuelmaki9412 2 ปีที่แล้ว

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

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

  • @AstroVista446
    @AstroVista446 ปีที่แล้ว

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

  • @joelten9499
    @joelten9499 3 ปีที่แล้ว

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

  • @dzeykop
    @dzeykop ปีที่แล้ว

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

  • @darrellverse
    @darrellverse 10 หลายเดือนก่อน

    Great teaching video! Concepts are explained extremely well.

  • @kaisen200
    @kaisen200 11 หลายเดือนก่อน

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

  • @mattheusmegdom
    @mattheusmegdom 4 ปีที่แล้ว +1

    lovely series Kylie, keep the good work !!!

  • @isuruherath7281
    @isuruherath7281 2 ปีที่แล้ว

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

  • @prateeksharma962
    @prateeksharma962 4 ปีที่แล้ว +1

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

  • @AnansiStorytime
    @AnansiStorytime ปีที่แล้ว

    wow! you are such a good teacher

  • @teacherinthailan6441
    @teacherinthailan6441 3 ปีที่แล้ว

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

  • @unique8721
    @unique8721 2 ปีที่แล้ว

    was watching your videos very entertaining lol

  • @juanruiz910
    @juanruiz910 3 ปีที่แล้ว

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

  • @kasrasharafi5007
    @kasrasharafi5007 2 ปีที่แล้ว

    Great teacher

  • @talitalmeida
    @talitalmeida 2 ปีที่แล้ว

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

  • @ameninsanov8077
    @ameninsanov8077 3 ปีที่แล้ว +1

    Your dog is too lovely😍😘💖💕

  • @franklinizuagwu3030
    @franklinizuagwu3030 2 ปีที่แล้ว

    Clear illustration, thanks

  • @ibrahimandong1572
    @ibrahimandong1572 2 ปีที่แล้ว

    great video kylie

  • @sinabtt6869
    @sinabtt6869 ปีที่แล้ว

    very cool thanks!

  • @nasraldeneisa4172
    @nasraldeneisa4172 ปีที่แล้ว

    Very nice , I like that

  • @saiusmc
    @saiusmc 2 ปีที่แล้ว

    Thank you for the video.

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

  • @EmmanuelAneni-o6m
    @EmmanuelAneni-o6m ปีที่แล้ว

    I LOVELY this intro hahaha :D

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

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

  • @Michal15Brummer
    @Michal15Brummer 2 ปีที่แล้ว

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

  • @Erenyeager50slk
    @Erenyeager50slk 2 ปีที่แล้ว

    Kylie, thank you. Your content is amazing.

  • @MathandScienceLearning
    @MathandScienceLearning 3 ปีที่แล้ว

    Nice tutss .. thumbs up dear ...

  • @passportbro904
    @passportbro904 ปีที่แล้ว

    Your good. Subbed

  • @xaiviereanthonysalud622
    @xaiviereanthonysalud622 2 ปีที่แล้ว

    Wat's your editor?

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

  • @pcebro
    @pcebro 9 หลายเดือนก่อน

    Thanks,

  • @mimilarbo2845
    @mimilarbo2845 2 ปีที่แล้ว

    WOw!

  • @alchemiststruth8247
    @alchemiststruth8247 3 ปีที่แล้ว

    🥰

  • @javhaasuhochir8126
    @javhaasuhochir8126 2 ปีที่แล้ว

    I love you

  • @jitendersingh-ju8bz
    @jitendersingh-ju8bz ปีที่แล้ว

    gr8

  • @nat-learningacademy9210
    @nat-learningacademy9210 2 ปีที่แล้ว

    Al piu de alda python della Funzioni al tutti.

  • @kimyoo2007
    @kimyoo2007 2 ปีที่แล้ว

    #you are amazingly beautiful and talented .Jessie

  • @playnowgames3450
    @playnowgames3450 2 ปีที่แล้ว

    Funny

  • @neouia777
    @neouia777 2 ปีที่แล้ว

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

  • @younesrabhi5298
    @younesrabhi5298 2 ปีที่แล้ว

    its beautiful to see beautiful Woman doing beautiful things :D

  • @nournounou2957
    @nournounou2957 ปีที่แล้ว

    Coding can never be fun 😭😭

  • @jesuisravi
    @jesuisravi 2 ปีที่แล้ว

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

  • @kwesibruno
    @kwesibruno ปีที่แล้ว

    work

  • @signoutmode6881
    @signoutmode6881 5 หลายเดือนก่อน

    Do u hava insta ???

  • @orestas7054
    @orestas7054 4 ปีที่แล้ว +4

    I love this series !!!

  • @affiliatepaid747
    @affiliatepaid747 2 ปีที่แล้ว

    I love you

  • @sanskarrawat
    @sanskarrawat 4 ปีที่แล้ว +2

    Thanks for video! keep it up.

  • @meemahslifeinverted2199
    @meemahslifeinverted2199 2 ปีที่แล้ว +1

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

  • @armandoruiz942
    @armandoruiz942 2 ปีที่แล้ว +1

    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

  • @MM-oq1lb
    @MM-oq1lb 11 หลายเดือนก่อน

    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

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

  • @talitalmeida
    @talitalmeida 2 ปีที่แล้ว

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

  • @talitalmeida
    @talitalmeida 2 ปีที่แล้ว

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

  • @Divyansh-Tiwari
    @Divyansh-Tiwari 4 ปีที่แล้ว +4

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

  • @kanakauthukam4414
    @kanakauthukam4414 2 ปีที่แล้ว

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

  • @fwily2580
    @fwily2580 2 ปีที่แล้ว

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

  • @1su-xb4pw
    @1su-xb4pw 11 หลายเดือนก่อน

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

  • @abodalmuhisen
    @abodalmuhisen 3 หลายเดือนก่อน

    thx a lot Kylie 🤗🤗🤗

  • @mohamadshahzad9578
    @mohamadshahzad9578 ปีที่แล้ว

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

  • @theycallmeerikaalexa1037
    @theycallmeerikaalexa1037 3 หลายเดือนก่อน

    I wasnt expecting you to be the dog haha

  • @yahelsasson5104
    @yahelsasson5104 2 ปีที่แล้ว

    you are awesome! like your attitude to have fun!

  • @alchemiststruth8247
    @alchemiststruth8247 3 ปีที่แล้ว +1

    😀👍🏿

    • @jweb3
      @jweb3 3 ปีที่แล้ว

      kylie, you are good. are you a python developer?do you have web site?
      i also saw your 8 project talk incl binary search

  • @arbaazali74
    @arbaazali74 2 ปีที่แล้ว

    crushing continuously on 0:00-0:11

  • @yusufmiftahudeen
    @yusufmiftahudeen 2 ปีที่แล้ว

    May Allah guide you to paradise

  • @adrianoribeiro8214
    @adrianoribeiro8214 2 ปีที่แล้ว

    obrigado minha linda otimo conteudo

  • @brainiceland
    @brainiceland ปีที่แล้ว

    This was really helpful!

  • @malakhassan9816
    @malakhassan9816 4 หลายเดือนก่อน

    You are really so cute

  • @ronniesamaroo1775
    @ronniesamaroo1775 2 ปีที่แล้ว

    You are so fucking cute

  • @dondonbautista2188
    @dondonbautista2188 2 ปีที่แล้ว

    I focused on your face haha

  • @dreadynerdy6382
    @dreadynerdy6382 2 ปีที่แล้ว

    thank you so much❣❣❣❣❣❣

  • @nedalalaoui3089
    @nedalalaoui3089 ปีที่แล้ว

    i love you lol

  • @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 2 ปีที่แล้ว

      What do you imply.. Do you mean you actually like coding but wanna refute your interest..?

  • @aaronessilfie3478
    @aaronessilfie3478 2 ปีที่แล้ว

    Very simple to understand, thank you.

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

  • @a1libot
    @a1libot 3 ปีที่แล้ว

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

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

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

  • @111jkjk
    @111jkjk 3 ปีที่แล้ว

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

  • @damychristo7475
    @damychristo7475 ปีที่แล้ว

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

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

  • @gmnahin
    @gmnahin 2 ปีที่แล้ว

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

  • @christinashumpert1599
    @christinashumpert1599 2 ปีที่แล้ว

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

  • @thihakoko1599
    @thihakoko1599 3 ปีที่แล้ว

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

  • @tunereclipsen
    @tunereclipsen 2 ปีที่แล้ว

    I like your analogies, doggo and squirrels are helpful.

  • @lily_h-m7j
    @lily_h-m7j 3 ปีที่แล้ว

    I appreciate the squirrel drawings =]