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)
# ---------- 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)
Hello,when will you make node.js tutorial?
straight to the point
Thanks
We need more examples please 🥺
what does f mean before the double quote
No credit card, no bullshit, straight to the point. Impressed.
Man you be on the corn hub too much
I got more out of a 10 minute video than three weeks of my college course! This cleared so much stuff up for me!
hey, what do u take in ur course?
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
@@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
yea same... I understood it ride away and it was on point. Our teacher is just so confusing when he is explaining stuff
I feel you
underated content
True
Yeah Mr. White
@zssllayers1946 right now i realised 💀
Fa real
Mr White this is not Chemistry, please take Science seriously
I was bro years old when I learned how to make a Python function. Thanks for the informative video!
😂😂
omg me too XD
TH-cam algorithm should show this type of good content more often
Just sub to them. My whole page is only codes);
My notifications are only coding videos
then sub
You need to hit the LIKE button.
@zssllayers1946 unsub from them and start clicking and subbing on tech videos
Bro explains functions better than my professor 😭
This guy does magic. My grades are all time high since i started watching these
Clear, simple, easy. Nicely done! Keep it up!
straight to the point, great explanation and good video length
keep it up man
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.
This is honestly the best explanation I've heard yet. Really great and super simple! Great job 👏 ❤
Great work, this tutorial is so clear & understandable.
Wow this tutorial is so easy to understand it's incredible!! Thank you so much
"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.
Dude. You are the shit. That was incredibly well spoken and actually landed in my brain stem properly. Love you dawg
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.
And he donates most of what he earns to charity
@@watermelonkfc Charities are scam with full of incompetent time wasting people, I wish he used it for himself and his family and friends.
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
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.
This video has helped me understand such basic stuff that i could not wrap my head around, thank you.
Thank you so much , i didn't grasp the difference between "return" and "print" , but you made it easy in this video
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!
Great, great content from the Bro🎉
Just awesome Bro. You make learning functions easy to understand in Python
My type of teacher. Simple and plain. Awesome job bro ✊
Well and succinctly presented. Thanks for sharing.
Bro, you're awesome. Thank you so so much!
Bro you’re amazing!!!
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.
Very easy way to convey difficult concept. Thanx
Really love you Bro Code. I wish you could do a video on some backend frame work like Django
Explained it better than a college professor.
My appreciation Bro!
Your lessons as simple as valuable!
The way you explain helps alot
I am Beginner in Python Thanks a lot from your easy videos Bro Code!
keep it up!
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
bro, you literally saved my life. thankyousomuch!!!
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.
simply amazing....
One video substituted a 30-page lecture, 🔥thank you
why do we use f string
Thank you so much for the easy to understand explanation. Appreciate it!
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".
great tutorial thank you
Thanks so much. This should blow up more
brocode im now learning a python and you changed my life you are real bro
Your videos are great tf❤
That's very helpful...Thanks Bro.
This is very clearly explained, thank you.
Thank you so much! this is so easy to understand!!!
Was looking through your courses on TH-cam. Do you plan to offer a Pandas course too?
I fucking love you Bro i understood functions in ten minutes rather than 2 weeks in my college. i owe you alot
So clear
Thank you so much
I watch you regularly. I learn a lot from your videos
Best coding videos on TH-cam 👍✌️
Great video. One question though, why did you place f before the "Happy birthday' the print?
Nice! Makes perfect sense!
tks from Brazil, the best that we got in youtube
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.
You literally taught me more in 10minutes than my lecturer taught me in 10 hours
Learning this this week in class. Nice video
I love ur videos!
Big fan 🔱✌️
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?
Your channel is a godsend!
As a student you made so much more sense then my instructor thank you
You are the best teacher ever!!!
You're an amazing teacher.
THANK YOU SO SO MUCH FOR THISSS
Thanks to this video it clears all my doubts
Absolutely great❤
God Bless You, Mate you helped me so so much.
thanks you made it easy to understand, you gain a learner form India
I am never looking at another tutorial youtuber again after finding you
Just got new sub here. Good content
Hi bro pls do full course about django, it'll be better if you do full course about backend, I appreciate your work 👏👏
you have no idea how much you help me !!!!!!!
You made learning fun for me never quit youtube
Great 👍🏽
this is very useful thank you very much
Absolutely baller video for a newbie like me. Absolutely marvelous
You explained this perfectly.
This really helped things click thank you 🙏
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 ❤
Thank you so much for ur time Bro, I'd like to ask you if you have courses in udemy platform?
great video
best video by far
this channel is a treasure
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 ❤
Love u bro
Хорошая рабочая связка Спасибо
one of the best programmer
Good job. Thx Bro Code!
Thank you bro you are wonderful
@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! :)
My teacher taught me everything in python but thanks guy that was very helpful. I can. Understand it better
was totally stuck before this video. helped explain what i was doing wrong!
really loved you 😊😊
Thank God for this channel
Hi, aren't the happy birthday code and invoice code both procedures as they don't return a value? thanks dude, great vid.
you should've also explained about packing and unpacking.