Functions in Python are easy 📞

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 พ.ค. 2024
  • #python #tutorial #course
    00:00:00 functions
    00:01:49 arguments
    00:04:28 exercise #1
    00:06:12 return
    00:08:27 exercise #2
    00:10:08 conclusion
    --------- EXAMPLE 1 ---------
    def display_invoice(username, amount, due_date):
    print(f"Hello {username}")
    print(f"Your bill of ${amount:.2f} is due: {due_date}")
    display_invoice("BroCode", 42.50, "01/02")
    display_invoice("JoeSchmo", 100.99, "02/03")
    --------- EXAMPLE 2 ---------
    def create_name(first, last):
    first = first.capitalize()
    last = last.capitalize()
    return first + " " + last
    full_name = create_name("spongebob", "squarepants")
    print(full_name)

ความคิดเห็น • 284

  • @BroCodez
    @BroCodez  ปีที่แล้ว +117

    # ---------- EXAMPLE 1 ----------
    def display_invoice(username, amount, due_date):
    print(f"Hello {username}")
    print(f"Your bill of ${amount:.2f} is due: {due_date}")
    # display_invoice("BroCode", 42.50, "01/01")
    # display_invoice("JoeSchmo", 100.01, "01/02")
    # ---------- EXAMPLE 2 ----------
    def create_name(first, last):
    first = first.capitalize()
    last = last.capitalize()
    return first + " " + last
    full_name = create_name("spongebob", "squarepants")
    print(full_name)

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

      Hello,when will you make node.js tutorial?

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

      straight to the point

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

      Thanks

    • @fatimasaeed2705
      @fatimasaeed2705 11 หลายเดือนก่อน +1

      We need more examples please 🥺

    • @rabiabatool1335
      @rabiabatool1335 6 หลายเดือนก่อน

      what does f mean before the double quote

  • @TheGeekosDen
    @TheGeekosDen ปีที่แล้ว +115

    No credit card, no bullshit, straight to the point. Impressed.

    • @momsspaghetti21
      @momsspaghetti21 2 หลายเดือนก่อน

      Man you be on the corn hub too much

  • @brysontrotman5865
    @brysontrotman5865 7 หลายเดือนก่อน +287

    I got more out of a 10 minute video than three weeks of my college course! This cleared so much stuff up for me!

    • @paxy3877
      @paxy3877 7 หลายเดือนก่อน +1

      hey, what do u take in ur course?

    • @user-ct7jc4dp9h
      @user-ct7jc4dp9h 6 หลายเดือนก่อน +21

      Your like the 20th person in college I’ve seen make a comment like that. I’m not going to college it seems like TH-cam university is good enough

    • @brysontrotman5865
      @brysontrotman5865 6 หลายเดือนก่อน

      @@user-ct7jc4dp9h unfortunately jobs like seeing that you have a piece of paper on your resume. While I'm sure someone is going to see this and comment how the got a programming job in three months after they read the first page of a Python book, for the most part Jobs require it

    • @lorna_ovlov240
      @lorna_ovlov240 6 หลายเดือนก่อน +6

      yea same... I understood it ride away and it was on point. Our teacher is just so confusing when he is explaining stuff

    • @Heitor55541
      @Heitor55541 5 หลายเดือนก่อน +3

      I feel you

  • @SarmK
    @SarmK ปีที่แล้ว +184

    underated content

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

      True

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

      Yeah Mr. White

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

      @zssllayers1946 right now i realised 💀

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

      Fa real

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

      Mr White this is not Chemistry, please take Science seriously

  • @radiantthoughts8718
    @radiantthoughts8718 11 หลายเดือนก่อน +132

    I was bro years old when I learned how to make a Python function. Thanks for the informative video!

  • @storm.5252
    @storm.5252 ปีที่แล้ว +81

    TH-cam algorithm should show this type of good content more often

    • @Notthetylor
      @Notthetylor ปีที่แล้ว +8

      Just sub to them. My whole page is only codes);

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

      My notifications are only coding videos

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

      then sub

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

      You need to hit the LIKE button.

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

      @zssllayers1946 unsub from them and start clicking and subbing on tech videos

  • @MarquezJohnson-ih9bq
    @MarquezJohnson-ih9bq 7 หลายเดือนก่อน +5

    Bro explains functions better than my professor 😭

  • @mihailomilenkovic6382
    @mihailomilenkovic6382 11 หลายเดือนก่อน +20

    This guy does magic. My grades are all time high since i started watching these

  • @86ddmorales1
    @86ddmorales1 ปีที่แล้ว +11

    Clear, simple, easy. Nicely done! Keep it up!

  • @pienipupu
    @pienipupu ปีที่แล้ว +41

    straight to the point, great explanation and good video length
    keep it up man

  • @josephcraig7477
    @josephcraig7477 3 หลายเดือนก่อน +1

    Helped me a ton with my first functions assignment man! Thanks big time. I'll be coming back to your page for tips in the future for sure.

  • @cherry.x_3806
    @cherry.x_3806 3 หลายเดือนก่อน +4

    This is honestly the best explanation I've heard yet. Really great and super simple! Great job 👏 ❤

  • @100animations8
    @100animations8 ปีที่แล้ว +11

    Great work, this tutorial is so clear & understandable.

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

    Wow this tutorial is so easy to understand it's incredible!! Thank you so much

  • @hassansyed6087
    @hassansyed6087 9 วันที่ผ่านมา

    "I think of parentheses as a pair of telephones talking to each other"
    I love on point analogies like this. It just helped me link so many things together with one good analogy.

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

    Dude. You are the shit. That was incredibly well spoken and actually landed in my brain stem properly. Love you dawg

  • @xzex2609
    @xzex2609 ปีที่แล้ว +51

    no matter how advance I am now thanks to you , I always enjoy your videos. there always have some details that you learn. Gold bless you , you can not imagine how you help people.

    • @watermelonkfc
      @watermelonkfc 6 หลายเดือนก่อน +1

      And he donates most of what he earns to charity

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

      @@watermelonkfc Charities are scam with full of incompetent time wasting people, I wish he used it for himself and his family and friends.

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

    No AI or any Robot can ever teach so explicitly like you Bro Code! You're an amazing teacher. I'd like to see a picture of your

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

      but can teach very complex tasks. I can program an entire website with color schemes by just telling ChatGPT to do it for me. It can also show you how to interact with databases with any language; pretty cool if you ask me.

  • @pirunnyrkki518
    @pirunnyrkki518 11 หลายเดือนก่อน +1

    This video has helped me understand such basic stuff that i could not wrap my head around, thank you.

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

    Thank you so much , i didn't grasp the difference between "return" and "print" , but you made it easy in this video

  • @robroszk
    @robroszk 2 หลายเดือนก่อน +1

    WOW! THANK YOU THANK YOU! Gonna sub to your channel. I was hitting my head against the wall trying to understand how functions worked. This really adds clarity in such a user friendly format. I am now a 'Bro Code' Subscriber Disciple!

  • @kapibara2440
    @kapibara2440 6 หลายเดือนก่อน +1

    Great, great content from the Bro🎉

  • @stevendumont4156
    @stevendumont4156 11 หลายเดือนก่อน +1

    Just awesome Bro. You make learning functions easy to understand in Python

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

    My type of teacher. Simple and plain. Awesome job bro ✊

  • @PhrontDoor
    @PhrontDoor 6 หลายเดือนก่อน

    Well and succinctly presented. Thanks for sharing.

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

    Bro, you're awesome. Thank you so so much!

  • @for-ever-22
    @for-ever-22 8 หลายเดือนก่อน

    Bro you’re amazing!!!

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

    Wow, this is a great video! Nice and simple explanation! All tutorials should be like this!
    I've seen other videos with so complicated explanation of basic Python features and makes learning it so hard.

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

    Very easy way to convey difficult concept. Thanx

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

    Really love you Bro Code. I wish you could do a video on some backend frame work like Django

  • @DillonHicks-ph8hy
    @DillonHicks-ph8hy หลายเดือนก่อน

    Explained it better than a college professor.

  • @chillwavemusic5024
    @chillwavemusic5024 6 หลายเดือนก่อน

    My appreciation Bro!
    Your lessons as simple as valuable!

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

    The way you explain helps alot

  • @MuhammadJamalAsadi-rv3od
    @MuhammadJamalAsadi-rv3od 16 วันที่ผ่านมา

    I am Beginner in Python Thanks a lot from your easy videos Bro Code!
    keep it up!

  • @wamimuswamimus3496
    @wamimuswamimus3496 11 หลายเดือนก่อน +1

    so far, this is the best video that helped me to understand def python command."
    I wish you you uploading move tutorial videos that explain in detail the concept of linking between argument and parameter and the logic behind it or how python picks those command and link them throughly.
    one thing I do not understand in this video is the "f" concept, when I've erased the answer that was gives is 4.1e1 instead of 42.5

  • @clivemcpike3065
    @clivemcpike3065 2 หลายเดือนก่อน +1

    bro, you literally saved my life. thankyousomuch!!!

  • @erandreella2926
    @erandreella2926 6 หลายเดือนก่อน

    There's a language (or dialect) barrier going on in my college but thanks to you, you taught me a lot not to mention that this video is free, thanks.

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

    simply amazing....

  • @Scott-hy3gs
    @Scott-hy3gs 7 หลายเดือนก่อน +3

    One video substituted a 30-page lecture, 🔥thank you

  • @humerakaleem4937
    @humerakaleem4937 4 หลายเดือนก่อน +5

    why do we use f string

  • @JosephPassi
    @JosephPassi 2 หลายเดือนก่อน

    Thank you so much for the easy to understand explanation. Appreciate it!

  • @tnr1337
    @tnr1337 3 หลายเดือนก่อน +1

    Dude, it was a really useful video because the teacher explained it in my own language (Turkish) and went through this topic without any explanation. Thanks to you, I understood the logic of "return".

  • @friedtofu6897
    @friedtofu6897 8 หลายเดือนก่อน

    great tutorial thank you

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

    Thanks so much. This should blow up more

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

    brocode im now learning a python and you changed my life you are real bro

  • @Thinkerfre
    @Thinkerfre 4 หลายเดือนก่อน +1

    Your videos are great tf❤

  • @scottjeffery4583
    @scottjeffery4583 28 วันที่ผ่านมา

    That's very helpful...Thanks Bro.

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

    This is very clearly explained, thank you.

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

    Thank you so much! this is so easy to understand!!!

  • @robroszk
    @robroszk 2 หลายเดือนก่อน +1

    Was looking through your courses on TH-cam. Do you plan to offer a Pandas course too?

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

    I fucking love you Bro i understood functions in ten minutes rather than 2 weeks in my college. i owe you alot

  • @balaportejean7015
    @balaportejean7015 23 วันที่ผ่านมา

    So clear
    Thank you so much

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

    I watch you regularly. I learn a lot from your videos

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

    Best coding videos on TH-cam 👍✌️

  • @softlightstudios
    @softlightstudios 2 หลายเดือนก่อน

    Great video. One question though, why did you place f before the "Happy birthday' the print?

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

    Nice! Makes perfect sense!

  • @cestlaviemarquez
    @cestlaviemarquez 2 หลายเดือนก่อน

    tks from Brazil, the best that we got in youtube

  • @clebersouza5428
    @clebersouza5428 10 วันที่ผ่านมา

    Bro, you helped me a lot, thank you. I'm not a native English speaker and I started to do a Harvard course recently. in the python subject, I was shocked with these functions, I did not understand why we use "def", because in python is "function". I know the name of the functionalities can change, but it wasn't so obvious at the first contact with the course.

  • @nathan8464
    @nathan8464 5 หลายเดือนก่อน +1

    You literally taught me more in 10minutes than my lecturer taught me in 10 hours

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

    Learning this this week in class. Nice video

  • @Sunwireless12
    @Sunwireless12 8 หลายเดือนก่อน

    I love ur videos!

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

    Big fan 🔱✌️

  • @aaronpaulxo
    @aaronpaulxo 8 หลายเดือนก่อน

    mr.brocode, suppose i have this program to book movie tickets and i am inputting the values inside a function. I have to store it in a database, but the query insert doesnt execute outside the function loop and when it does execute inside the loop the values and stored in different rows since i have inputs from various functions. How can i insert the values from more than 1 function into the same row in mysql?

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

    Your channel is a godsend!

  • @GamingAngelx
    @GamingAngelx 2 หลายเดือนก่อน

    As a student you made so much more sense then my instructor thank you

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

    You are the best teacher ever!!!

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

    You're an amazing teacher.

  • @psychehedelic
    @psychehedelic 3 หลายเดือนก่อน +1

    THANK YOU SO SO MUCH FOR THISSS

  • @b.nidhish4491
    @b.nidhish4491 2 หลายเดือนก่อน

    Thanks to this video it clears all my doubts

  • @imashvyn
    @imashvyn 7 หลายเดือนก่อน

    Absolutely great❤

  • @O_io6
    @O_io6 6 หลายเดือนก่อน

    God Bless You, Mate you helped me so so much.

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

    thanks you made it easy to understand, you gain a learner form India

  • @theworld4156
    @theworld4156 6 หลายเดือนก่อน

    I am never looking at another tutorial youtuber again after finding you

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

    Just got new sub here. Good content

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

    Hi bro pls do full course about django, it'll be better if you do full course about backend, I appreciate your work 👏👏

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

    you have no idea how much you help me !!!!!!!

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

    You made learning fun for me never quit youtube

  • @kevinsenquiz902
    @kevinsenquiz902 6 หลายเดือนก่อน

    Great 👍🏽

  • @binheptrai2k10nhuccainach3
    @binheptrai2k10nhuccainach3 4 หลายเดือนก่อน +1

    this is very useful thank you very much

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

    Absolutely baller video for a newbie like me. Absolutely marvelous

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

    You explained this perfectly.

  • @dominickcharbonneau9250
    @dominickcharbonneau9250 6 หลายเดือนก่อน

    This really helped things click thank you 🙏

  • @arjunmanoj5249
    @arjunmanoj5249 6 หลายเดือนก่อน

    Hi Bro.
    Great content.
    You're amazing.🎉
    Is there smtng that'd be done to get value from user in the output screen?
    Like:
    I know the code to do so.. but using def, I'm not really sure.
    It goes like-
    a=int(input ("enter the number))
    Here;
    int is integer data-type
    a = a variable
    I'm working on a simple code to get max of 3 nos using def
    I'm waiting for a positive response xoxo ❤

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

    Thank you so much for ur time Bro, I'd like to ask you if you have courses in udemy platform?

  • @hi-xn5hi
    @hi-xn5hi 3 วันที่ผ่านมา

    great video

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

    best video by far

  • @milevamaric9244
    @milevamaric9244 2 หลายเดือนก่อน

    this channel is a treasure

  • @miguellobo4841
    @miguellobo4841 6 หลายเดือนก่อน

    If someday I get my programmer job, trust me, I will come back to this channel to thank you, it may be many years, but if I get this job, thanks Bro Code ❤

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

    Love u bro

  • @user-wh7st7hc2e
    @user-wh7st7hc2e 5 หลายเดือนก่อน +1

    Хорошая рабочая связка Спасибо

  • @Ectro.aeptiktok
    @Ectro.aeptiktok 28 วันที่ผ่านมา

    one of the best programmer

  • @user-bi6ie4ct6o
    @user-bi6ie4ct6o 4 หลายเดือนก่อน

    Good job. Thx Bro Code!

  • @user-qv6eu1qi7w
    @user-qv6eu1qi7w 7 หลายเดือนก่อน

    Thank you bro you are wonderful

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

    @Bro Code, When you do f strings a good suggestion is explain to the viewers what an f string is. But besides that great vid! :)

  • @stevena1425
    @stevena1425 20 วันที่ผ่านมา

    My teacher taught me everything in python but thanks guy that was very helpful. I can. Understand it better

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

    was totally stuck before this video. helped explain what i was doing wrong!

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

    really loved you 😊😊

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

    Thank God for this channel

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

    Hi, aren't the happy birthday code and invoice code both procedures as they don't return a value? thanks dude, great vid.

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

    you should've also explained about packing and unpacking.