#32 Python Tutorial for Beginners | Functions in Python

  Рет қаралды 1,018,636

Telusko

Telusko

6 жыл бұрын

Check out our courses:
Enterprise Java Spring Microservices: go.telusko.com/enterpriseJava
Coupon: TELUSKO10 (10% Discount)
Master Java Spring Development : go.telusko.com/masterjava
Coupon: TELUSKO20 (20% Discount)
Udemy Courses:
Spring: go.telusko.com/udemyteluskosp...
Java:- go.telusko.com/udemyteluskojava
Java Spring:- go.telusko.com/Udemyjavaspring
Java For Programmers:- go.telusko.com/javaProgrammers
Python : go.telusko.com/udemyteluskopy...
Git : go.telusko.com/udemyteluskogit
Docker : go.telusko.com/udemyteluskodo...
For More Queries WhatsApp or Call on : +919008963671
website : courses.telusko.com/
Instagram : / navinreddyofficial
Linkedin : / navinreddy20
TELUSKO Android App : bit.ly/TeluskoApp
In this lecture we are discussing:
#1 What are functions?
#2 Arguments in function
#3 return statement in python
#1
-- A function is a block of code that performs a specific task.
-- Functions are used to break down larger programs into smaller and more manageable chunks,
making it easier to read, test, and debug code.
-- Functions can take input arguments, perform operations on them, and return output values.
-- To define a function in Python, you use the def keyword followed by the function name,
input parameters (if any), and a colon. The function body is then indented and contains the code to be executed.
Here's an example of a simple Python function that takes two arguments and returns their sum:
def add_numbers(a, b):
sum = a + b
return sum
add_numbers(4,5) # calling the function
without calling the function cannot run
#2
Arguments in python
-- whatever variable is used inside a function during the defining of the function is called a formal argument.
-- whatever value you passed during the calling is called actual arguments.
#3
-- The return statement is used to exit a function and return a value.
-- The return statement can be used to return a value from a function.
-- The return statement can also be used to exit a function without returning a value.
-- If the return statement is without any expression, then the special value None is returned.
-- Functions without a return statement return None as their result.
def add_sub(x,y):
c = x+y
d = x-y
return c,d
result1,result2 = add_sub(4,5)
print(result1,result2)
The above code defines a Python function called add_sub that takes two input arguments x and y. The function first adds x and y and stores the result in a variable called c. It then subtracts y from x and stores the result in a variable called d. Finally, it returns both c and d as a tuple.
The function can be called with two arguments, as shown in the line result1,result2 = add_sub(4,5). This line assigns the values returned by the add_sub function to the variables result1 and result2, respectively. The print statement then outputs the values of result1 and result2 to the console.
Github :- github.com/navinreddy20/Python-
Python for Beginners :- bit.ly/3JOLQhl
Java:- bit.ly/JavaUdemyTelusko
Spring:- bit.ly/SpringUdemyTelusko
More Learning :
Java :- bit.ly/3x6rr0N
Python :- bit.ly/3GRc7JX
Django :- bit.ly/3MmoJK6
JavaScript :- bit.ly/3tiAlHo
Node JS :- bit.ly/3GT4liq
Rest Api :-bit.ly/3MjhZwt
Servlet :- bit.ly/3Q7eA7k
Spring Framework :- bit.ly/3xi7buh
Design Patterns in Java :- bit.ly/3MocXiq
Docker :- bit.ly/3xjWzLA
Blockchain Tutorial :- bit.ly/3NSbOkc
Corda Tutorial:- bit.ly/3thbUKa
Hyperledger Fabric :- bit.ly/38RZCRB
NoSQL Tutorial :- bit.ly/3aJpRuc
Mysql Tutorial :- bit.ly/3thpr4L
Data Structures using Java :- bit.ly/3MuJa7S
Git Tutorial :- bit.ly/3NXyCPu
Donation:
PayPal Id : navinreddy20
www.telusko.com

Пікірлер: 395
@chriscruz429
@chriscruz429 4 жыл бұрын
I’ve learned more from his videos than two years of paid college classes.
@AdityaYadav-ky2ng
@AdityaYadav-ky2ng 4 жыл бұрын
So, stop bunking classes 😂
@zapphireqvq8954
@zapphireqvq8954 3 жыл бұрын
How about code with harry?
@chriscruz429
@chriscruz429 3 жыл бұрын
Aditya yadav *Ba dum tsss
@chriscruz429
@chriscruz429 3 жыл бұрын
Zapphire QvQ Haven’t checked his videos out, but I will though.
@sandysandy9254
@sandysandy9254 3 жыл бұрын
@@zapphireqvq8954 code with harry talk so fast it is good i also follow him but he talk fast
@ademolaodusanya5678
@ademolaodusanya5678 2 жыл бұрын
Always coming back here after paid online lectures
@Steve-wo5ry
@Steve-wo5ry 4 жыл бұрын
I could not understand what my teacher taught in 3 months, I am understanding in 10 minutes! Thank you very much sir, may God bless you!👍
@surampudiswetha6099
@surampudiswetha6099 Жыл бұрын
Hello Sir, I never thought my brain would ever understand python this easy, thanks to you, wishing you health and happiness to you!!, also proud that I can add this to my skills as I have not learnt in my UG classes.
@Mahi_452
@Mahi_452 5 жыл бұрын
you explained very well which simply means that I learning programming and your words are making me more fluent with English.THANKS YOU SO MUCH
@adityabapat2070
@adityabapat2070 4 жыл бұрын
As he said he wo'nt be available. Rahul
@Mamurjon877
@Mamurjon877 3 жыл бұрын
7:34 the best explanation I have ever heard to understand types of function
@billi2247
@billi2247 2 жыл бұрын
Yeah !!! M impressed
@vidyasadansteptowardsenlig3579
@vidyasadansteptowardsenlig3579 3 жыл бұрын
Sir , you are doing exceptionally good work for us who are beginners in this field. Your videos are really easily understandable .
@preethiyr4525
@preethiyr4525 5 жыл бұрын
Very neat & clear explaination about Python functions Sir. Thank you.
@WorldUpdates4U
@WorldUpdates4U 4 жыл бұрын
Sir I m telling you that your teaching skills is different from other it make me very easy to understand. Thanks a lot.
@mdkhader3670
@mdkhader3670 3 жыл бұрын
You are a phenomenal in explaining python concepts very well :) Nice to have a good tutor like you
@arju6996
@arju6996 5 жыл бұрын
English is not even this guys first language yet he can still teach better than my high school Comp Sci teacher. Thank you for the tutorials!
@misstahj5651
@misstahj5651 5 жыл бұрын
He teaches better than my college professor lmao
@subhayansinha4417
@subhayansinha4417 5 жыл бұрын
These videos r amazingly helpful and clearly express the topic. Really like em👍👍
@kisanmanila9317
@kisanmanila9317 4 жыл бұрын
Hi Naveen, Your videos are very good and really helping to get confidence. I am working on corporate having 13 years of experience and worked only in infra structure side. So, not having experience of Coding. But want to switch to programming as well. thanks for help
@mohammadkhanafer4847
@mohammadkhanafer4847 2 жыл бұрын
Thank you for making the material so digestible, even for those of us who hate programming!!
@arihantratdiya319
@arihantratdiya319 3 жыл бұрын
That's a great work done by you sir it's helping every one a lot for learning quickly python thank you so much sir 🙏🏻🙏🏻 it's also like a rivision for me because I learned python earlier but it's not that clear in my mind like you did now all the concepts and basics I learnt to see your great and very interesting videos thank you so much sir for making videos like this 🙏🏻🙏🏻😊
@lucasvandelogt5126
@lucasvandelogt5126 5 жыл бұрын
Thank you for explaining! This definitely helped in my exam :)
@adamshaffi
@adamshaffi 5 жыл бұрын
A big thanks for this video bro... Looked so many places to understand functions but found here.
@thetanix7850
@thetanix7850 4 жыл бұрын
Sir your videos are very helpful thank you for making programming so easy 🔥
@deepshikasingh984
@deepshikasingh984 5 жыл бұрын
Thank you so much navin sir.... Its fun to learn python... Ur videos makes codings interesting... 😍👌
@sudhanshuklkrn
@sudhanshuklkrn 3 жыл бұрын
This is fun and I am enjoying it. Sir....Thank you sooo much. You have made this even more interesting.
@surajkiran636
@surajkiran636 3 жыл бұрын
You are great sir You just made my first project within a min Print(“love you sir”) Love you sir , here it is
@amit4994
@amit4994 2 жыл бұрын
Thank you so much, sir. I have joined a course by google but I always watch your video for understanding more clearly.
@opinions.029
@opinions.029 4 жыл бұрын
sir loved your gif right after the execution of add function 😜 best teacher though 💯
@gyanesh8410
@gyanesh8410 4 жыл бұрын
Gr8 man!!! I had not been able to understand return by my school teachers but now u made things clear and v simple!😄👍
@gibranfahad6876
@gibranfahad6876 4 жыл бұрын
thank you so much sir the way u explained functions in this session was simply awesome
@siddharthchampia5674
@siddharthchampia5674 4 жыл бұрын
Awesome job you're way better than my school teacher😍
@meenakshidas9984
@meenakshidas9984 3 жыл бұрын
After finishing python tutorials it will not be the end, I will go through all of your tutorials this quarantine and make myself better... Thank you so much sir ❤️❤️
@watchwithmantri
@watchwithmantri 3 жыл бұрын
You got the job?
@meenakshidas9984
@meenakshidas9984 3 жыл бұрын
@@watchwithmantri no I'm a student
@watchwithmantri
@watchwithmantri 3 жыл бұрын
@@meenakshidas9984 okk you completed python??
@meenakshidas9984
@meenakshidas9984 3 жыл бұрын
@@watchwithmantri no
@parasghanshala7309
@parasghanshala7309 3 жыл бұрын
Sir, thanks for this video because I was having some doubts in function topic, but now all doubts are clear 😊
@jagadishs1086
@jagadishs1086 4 жыл бұрын
Sir I'm ur big fan sir .....ur making the concept very clear and thank you soo much sir for awesome videos...♥️
@mdfaaz1611
@mdfaaz1611 Жыл бұрын
May God bless you and thanks for explaining in most accurate and simple way.🙂
@Cvsreddy-rn5st
@Cvsreddy-rn5st Жыл бұрын
The way that ur teaching was amazing
@reddydc5562
@reddydc5562 Жыл бұрын
absolutely well done, loved your video, like a knowledge injection into my brain.
@varunkrishnaKyathanpally
@varunkrishnaKyathanpally 5 жыл бұрын
You made it easy to understand, tq :)
@alexikamran7039
@alexikamran7039 Жыл бұрын
Brother you make coding so much easy , you are gifted. Love from bangladesh!
@indradeepchowdhury9430
@indradeepchowdhury9430 4 жыл бұрын
This is very helpful...... Thank you sir
@hbs1231
@hbs1231 2 жыл бұрын
Finally, someone who can explain this clearly.
@moazelsawaf2000
@moazelsawaf2000 5 жыл бұрын
Thanks a lot sir ❤
@hariteshkumar281
@hariteshkumar281 4 жыл бұрын
you can also take input from the user rather than giving your own value that can make the code more user friendly
@gandalffury127
@gandalffury127 Ай бұрын
I ve been trying to understand what return does for a while now nobody was able to explain it in such a way i would get it, you sir just did it! Thank you a thousand times! Like and sub!
@standman007
@standman007 5 жыл бұрын
Copy book demo Navin. Really cool and perfect
@shahnwazalansari5937
@shahnwazalansari5937 3 жыл бұрын
The way of your explanation outstanding and in point of view out of the world love you sir from button of my heart 💓 amazing 👌
@ritikasharma7849
@ritikasharma7849 4 жыл бұрын
No one can explain like you🤟
@b.sasikumar2141
@b.sasikumar2141 4 жыл бұрын
Ur teaching lectures all have seldom to learn python sir tq sir for giving pleasureble cousre sir..... 👍👍
@RahulGupta-ly2uu
@RahulGupta-ly2uu 6 жыл бұрын
I always get something from your videos Sir just tell me in python always i have seen that in the function arguments there is always a self keyword used why it is used? I think u should teach a self usage in next video. Babye.....
@mithunacharya5813
@mithunacharya5813 Жыл бұрын
Thank you so much for teaching us on easiest way,sir much love!
@subhajitsaha7068
@subhajitsaha7068 4 жыл бұрын
I like your video sir.Neat and clear explanation your examples are awesome .
@Alberta_Farmer
@Alberta_Farmer Жыл бұрын
Further Enlightenment every ten minutes I gain when my attention I give to you))))
@khadarbabamohammad580
@khadarbabamohammad580 2 жыл бұрын
I am really happy with your detail explanation...Thank You.
@raghavendrabm6274
@raghavendrabm6274 3 жыл бұрын
i feel really perfect this videos to learn python beginners
@sanju-lb9rn
@sanju-lb9rn 2 жыл бұрын
glad i found your video , helped me a lot
@ridhwangani9444
@ridhwangani9444 3 жыл бұрын
Thanks for the great explanation!
@natriumguy8537
@natriumguy8537 3 жыл бұрын
This was a super amazing video.
@harsiddhisinghdev4650
@harsiddhisinghdev4650 6 жыл бұрын
Waooo sir thankuuuuuu for awesome tutorial
@225vikrant3
@225vikrant3 4 жыл бұрын
Yo man you are cool and your explanation direct into head !!😉🙋 great !!
@tallentedhai4238
@tallentedhai4238 3 жыл бұрын
Your cartoon character was excellent sir😂😂
@amaniganza1154
@amaniganza1154 4 жыл бұрын
thanks Navin it is clear
@MsVulgar
@MsVulgar 6 жыл бұрын
Awesome 👍
@sanjeevashoka7948
@sanjeevashoka7948 5 жыл бұрын
thanks a lot. Sir also make video on some course related projects.....
@ImKLRahul
@ImKLRahul 3 жыл бұрын
Truly one word for u- ur gem this language... 😊
@bryanpaderes8963
@bryanpaderes8963 6 жыл бұрын
great explanation sir!
@Thodapod
@Thodapod 6 жыл бұрын
nice -useful video .Thanks a lot sir..
@cherulast7998
@cherulast7998 4 жыл бұрын
it was perfect bro. it was easy but better to add with complex also
@waqassalii1558
@waqassalii1558 3 жыл бұрын
sir great job !!!!! thanks a lot ...
@bharathreddy6208
@bharathreddy6208 4 жыл бұрын
I'm expecting some more clarification on "return".
@collinsouma283
@collinsouma283 4 жыл бұрын
Its confusing. Solution == check your indention
@huntersparky7446
@huntersparky7446 4 жыл бұрын
print just simply prints the output but return process the value which you can store in a var
@yingbowang3068
@yingbowang3068 4 жыл бұрын
clear & easy to understand! a mid age mom with 2 kids never touched program can understand. hope have some examples to know better how to use in real life. the internet resources always too basic or too complex for a nut like me ...thanks a lot :D
@MrAnandhasanker
@MrAnandhasanker 4 жыл бұрын
Print function only print cannot assign Return functions print and also can assign variable to it
@thanigai2725
@thanigai2725 4 жыл бұрын
Thank you sir for your valuable work.💫
@kirankumar-re4yg
@kirankumar-re4yg 5 жыл бұрын
Its really Awesome
@vakhariyajay2224
@vakhariyajay2224 2 жыл бұрын
Thank you very much. You are a genius.
@gokulp4788
@gokulp4788 4 жыл бұрын
Thank you so much sir. Very informative.... subscribed
@nomanulhaq6601
@nomanulhaq6601 2 жыл бұрын
very helpful and easy to understand video
@amruthasankar3453
@amruthasankar3453 Жыл бұрын
Reallyyyy....superbb class❤️❤️❤️❤️❤️❤️❤️🤩🤩🤩🤩🤩🔥🔥🔥🔥🔥interesting...too...,the way of your explanation is.....really simple and humble so everyone can understand those topics very easily😍😍😍😍god bless you sir🙌🙌🙌🙌god bless you more and more😊🌸🌸🌸
@yanamalasankar9389
@yanamalasankar9389 5 жыл бұрын
Super video Siru Thai is very helpful myself
@davidanamunda6766
@davidanamunda6766 3 жыл бұрын
THANKYOU VERY MUCH THIS VIDEO HAS REALLY HELPED ME
@mirmeraj5703
@mirmeraj5703 5 жыл бұрын
Super amazing video.
@HARPREETKAUR-jv7ek
@HARPREETKAUR-jv7ek 4 жыл бұрын
Thank you sir 😻
@fareedsk6955
@fareedsk6955 3 жыл бұрын
Thanks for suggestion at end
@Thefreesoul841
@Thefreesoul841 5 жыл бұрын
Very Interesting Videos on python
@sanjaisrao484
@sanjaisrao484 2 жыл бұрын
Exellent explaination of return
@MANISHSHARMA-xk1su
@MANISHSHARMA-xk1su 6 жыл бұрын
Nice video sir....❤️
@sathyaprasanna8457
@sathyaprasanna8457 4 жыл бұрын
thank you so much sir for teaching us.
@imamhussain4200
@imamhussain4200 5 жыл бұрын
Hi sir, In c execution starts from main(), in python execution starts from?
@raihanation
@raihanation 4 жыл бұрын
yes, it's amazing
@mhohomama
@mhohomama 4 жыл бұрын
awesome thaaaaaaaanks
@syedmohammedhayath6428
@syedmohammedhayath6428 Жыл бұрын
Just Lovely! You're the light
@deepika.r8098
@deepika.r8098 4 жыл бұрын
Thank you sir very useful video
@susanshal5047
@susanshal5047 4 жыл бұрын
Nice explaination sir.
@danielkamau8436
@danielkamau8436 4 жыл бұрын
excellent sir blessing upon u
@preetisingh2008
@preetisingh2008 2 жыл бұрын
You are amazing.. Your explainations are more better then the school PDFs
@kartikey21-10
@kartikey21-10 Жыл бұрын
in which class you are ?
@samarthasam2928
@samarthasam2928 2 жыл бұрын
I am learning urs teaching so amazing😍
@aaronfisher5989
@aaronfisher5989 3 жыл бұрын
Thank you very informative
@tarekererajeeva3917
@tarekererajeeva3917 3 жыл бұрын
Very well explained sir
@sufiyanmogal1527
@sufiyanmogal1527 2 жыл бұрын
Nice Explanation Sir
@shazs8178
@shazs8178 4 жыл бұрын
really the way you explain is Splendid
@user-kv6wy5sb3m
@user-kv6wy5sb3m 3 жыл бұрын
yaa we enjoy the video thanks so much
@vipankumar5596
@vipankumar5596 3 жыл бұрын
Nice to watch
@martinkaspar5095
@martinkaspar5095 3 жыл бұрын
hi there _ great stuff - it would be more great if we do it in jupiter. But again - you did a great job
@shaziamohdsajimshagufta65
@shaziamohdsajimshagufta65 4 ай бұрын
Thank you sir! you teach with simple way i learned😊
@Sachin_-qs6he
@Sachin_-qs6he 2 жыл бұрын
excellent knowledge thank you sir
@chakrinithesh5142
@chakrinithesh5142 5 жыл бұрын
thank u very much ,sir
@ankitchetri2968
@ankitchetri2968 4 жыл бұрын
Thank u sir for existing
@PrasannaKumar-zx7gr
@PrasannaKumar-zx7gr 4 жыл бұрын
Thank you sir!!
#20 Python Tutorial for Beginners | While Loop in Python
12:43
Telusko
Рет қаралды 1,6 МЛН
Best KFC Homemade For My Son #cooking #shorts
00:58
BANKII
Рет қаралды 68 МЛН
Sigma girl and soap bubbles by Secret Vlog
00:37
Secret Vlog
Рет қаралды 14 МЛН
БАБУШКИН КОМПОТ В СОЛО
00:23
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 17 МЛН
Functions in Python are easy 📞
10:38
Bro Code
Рет қаралды 432 М.
Functions in Python | Introduction | Python for beginners #lec56
24:07
Jenny's Lectures CS IT
Рет қаралды 123 М.
Python Functions (The Only Guide You'll Need) #12
17:20
Programiz
Рет қаралды 566 М.
Python Functions | Python Tutorial for Absolute Beginners #1
30:34
Programming with Mosh
Рет қаралды 933 М.
How To Use Functions In Python (Python Tutorial #3)
14:55
CS Dojo
Рет қаралды 2,3 МЛН
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 391 М.
#38 Python Tutorial for Beginners | Fibonacci Sequence
8:01
Telusko
Рет қаралды 778 М.
#43 Python Tutorial for Beginners | Filter Map Reduce
11:34
Telusko
Рет қаралды 573 М.
Look, this is the 97th generation of the phone?
0:13
Edcers
Рет қаралды 7 МЛН
low battery 🪫
0:10
dednahype
Рет қаралды 1,5 МЛН
Как удвоить напряжение? #электроника #умножитель
1:00
Hi Dev! – Электроника
Рет қаралды 1,1 МЛН
Проверил, как вам?
0:58
Коннор
Рет қаралды 240 М.
Частая ошибка геймеров? 😐 Dareu A710X
1:00
Вэйми
Рет қаралды 4,1 МЛН