#32 Python Tutorial for Beginners | Functions in Python

  Рет қаралды 1,011,535

Telusko

Telusko

6 жыл бұрын

Check out our courses:
Spring and Microservices Weekend Live Batch : bit.ly/spring-live-weekend
Coupon: TELUSKO10 (10% Discount)
Master Java Spring Development : bit.ly/java-spring-cloud
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

Пікірлер: 394
@chriscruz429
@chriscruz429 4 жыл бұрын
I’ve learned more from his videos than two years of paid college classes.
@AdityaYadav-ky2ng
@AdityaYadav-ky2ng 3 жыл бұрын
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.
@Mamurjon877
@Mamurjon877 3 жыл бұрын
7:34 the best explanation I have ever heard to understand types of function
@billi2247
@billi2247 2 жыл бұрын
Yeah !!! M impressed
@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 3 жыл бұрын
As he said he wo'nt be available. Rahul
@preethiyr4525
@preethiyr4525 4 жыл бұрын
Very neat & clear explaination about Python functions Sir. Thank you.
@vidyasadansteptowardsenlig3579
@vidyasadansteptowardsenlig3579 3 жыл бұрын
Sir , you are doing exceptionally good work for us who are beginners in this field. Your videos are really easily understandable .
@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
@subhayansinha4417
@subhayansinha4417 5 жыл бұрын
These videos r amazingly helpful and clearly express the topic. Really like em👍👍
@mohammadkhanafer4847
@mohammadkhanafer4847 2 жыл бұрын
Thank you for making the material so digestible, even for those of us who hate programming!!
@lucasvandelogt5126
@lucasvandelogt5126 5 жыл бұрын
Thank you for explaining! This definitely helped in my exam :)
@thetanix7850
@thetanix7850 4 жыл бұрын
Sir your videos are very helpful thank you for making programming so easy 🔥
@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 🙏🏻🙏🏻😊
@deepshikasingh984
@deepshikasingh984 5 жыл бұрын
Thank you so much navin sir.... Its fun to learn python... Ur videos makes codings interesting... 😍👌
@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
@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
@adamshaffi
@adamshaffi 4 жыл бұрын
A big thanks for this video bro... Looked so many places to understand functions but found here.
@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.
@sudhanshuklkrn
@sudhanshuklkrn 3 жыл бұрын
This is fun and I am enjoying it. Sir....Thank you sooo much. You have made this even more interesting.
@mdfaaz1611
@mdfaaz1611 Жыл бұрын
May God bless you and thanks for explaining in most accurate and simple way.🙂
@gibranfahad6876
@gibranfahad6876 3 жыл бұрын
thank you so much sir the way u explained functions in this session was simply awesome
@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...♥️
@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!😄👍
@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
@parasghanshala7309
@parasghanshala7309 3 жыл бұрын
Sir, thanks for this video because I was having some doubts in function topic, but now all doubts are clear 😊
@Cvsreddy-rn5st
@Cvsreddy-rn5st Жыл бұрын
The way that ur teaching was amazing
@b.sasikumar2141
@b.sasikumar2141 4 жыл бұрын
Ur teaching lectures all have seldom to learn python sir tq sir for giving pleasureble cousre sir..... 👍👍
@varunkrishnaKyathanpally
@varunkrishnaKyathanpally 4 жыл бұрын
You made it easy to understand, tq :)
@siddharthchampia5674
@siddharthchampia5674 4 жыл бұрын
Awesome job you're way better than my school teacher😍
@indradeepchowdhury9430
@indradeepchowdhury9430 4 жыл бұрын
This is very helpful...... Thank you sir
@moazelsawaf2000
@moazelsawaf2000 5 жыл бұрын
Thanks a lot sir ❤
@opinions.029
@opinions.029 4 жыл бұрын
sir loved your gif right after the execution of add function 😜 best teacher though 💯
@reddydc5562
@reddydc5562 Жыл бұрын
absolutely well done, loved your video, like a knowledge injection into my brain.
@alexikamran7039
@alexikamran7039 Жыл бұрын
Brother you make coding so much easy , you are gifted. Love from bangladesh!
@mithunacharya5813
@mithunacharya5813 Жыл бұрын
Thank you so much for teaching us on easiest way,sir much love!
@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 👌
@khadarbabamohammad580
@khadarbabamohammad580 2 жыл бұрын
I am really happy with your detail explanation...Thank You.
@thanigai2725
@thanigai2725 3 жыл бұрын
Thank you sir for your valuable work.💫
@subhajitsaha7068
@subhajitsaha7068 4 жыл бұрын
I like your video sir.Neat and clear explanation your examples are awesome .
@ridhwangani9444
@ridhwangani9444 3 жыл бұрын
Thanks for the great explanation!
@raghavendrabm6274
@raghavendrabm6274 3 жыл бұрын
i feel really perfect this videos to learn python beginners
@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
@gandalffury127
@gandalffury127 21 күн бұрын
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!
@gokulp4788
@gokulp4788 4 жыл бұрын
Thank you so much sir. Very informative.... subscribed
@davidanamunda6766
@davidanamunda6766 3 жыл бұрын
THANKYOU VERY MUCH THIS VIDEO HAS REALLY HELPED ME
@waqassalii1558
@waqassalii1558 3 жыл бұрын
sir great job !!!!! thanks a lot ...
@ImKLRahul
@ImKLRahul 3 жыл бұрын
Truly one word for u- ur gem this language... 😊
@standman007
@standman007 5 жыл бұрын
Copy book demo Navin. Really cool and perfect
@sathyaprasanna8457
@sathyaprasanna8457 4 жыл бұрын
thank you so much sir for teaching us.
@natriumguy8537
@natriumguy8537 3 жыл бұрын
This was a super amazing video.
@syedmohammedhayath6428
@syedmohammedhayath6428 Жыл бұрын
Just Lovely! You're the light
@ritikasharma7849
@ritikasharma7849 4 жыл бұрын
No one can explain like you🤟
@amaniganza1154
@amaniganza1154 4 жыл бұрын
thanks Navin it is clear
@harsiddhisinghdev4650
@harsiddhisinghdev4650 6 жыл бұрын
Waooo sir thankuuuuuu for awesome tutorial
@deepika.r8098
@deepika.r8098 4 жыл бұрын
Thank you sir very useful video
@sanju-lb9rn
@sanju-lb9rn 2 жыл бұрын
glad i found your video , helped me a lot
@shaziamohdsajimshagufta65
@shaziamohdsajimshagufta65 3 ай бұрын
Thank you sir! you teach with simple way i learned😊
@vakhariyajay2224
@vakhariyajay2224 Жыл бұрын
Thank you very much. You are a genius.
@yanamalasankar9389
@yanamalasankar9389 5 жыл бұрын
Super video Siru Thai is very helpful myself
@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😊🌸🌸🌸
@225vikrant3
@225vikrant3 4 жыл бұрын
Yo man you are cool and your explanation direct into head !!😉🙋 great !!
@hbs1231
@hbs1231 2 жыл бұрын
Finally, someone who can explain this clearly.
@kirankumar-re4yg
@kirankumar-re4yg 4 жыл бұрын
Its really Awesome
@Thodapod
@Thodapod 6 жыл бұрын
nice -useful video .Thanks a lot sir..
@shazs8178
@shazs8178 4 жыл бұрын
really the way you explain is Splendid
@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
@raihanation
@raihanation 4 жыл бұрын
yes, it's amazing
@HARPREETKAUR-jv7ek
@HARPREETKAUR-jv7ek 4 жыл бұрын
Thank you sir 😻
@aaronfisher5989
@aaronfisher5989 2 жыл бұрын
Thank you very informative
@mirmeraj5703
@mirmeraj5703 5 жыл бұрын
Super amazing video.
@fareedsk6955
@fareedsk6955 3 жыл бұрын
Thanks for suggestion at end
@danielkamau8436
@danielkamau8436 4 жыл бұрын
excellent sir blessing upon u
@bryanpaderes8963
@bryanpaderes8963 6 жыл бұрын
great explanation sir!
@Thefreesoul841
@Thefreesoul841 5 жыл бұрын
Very Interesting Videos on python
@cherulast7998
@cherulast7998 4 жыл бұрын
it was perfect bro. it was easy but better to add with complex also
@chakrinithesh5142
@chakrinithesh5142 5 жыл бұрын
thank u very much ,sir
@samarthasam2928
@samarthasam2928 2 жыл бұрын
I am learning urs teaching so amazing😍
@ankitchetri2968
@ankitchetri2968 3 жыл бұрын
Thank u sir for existing
@sanjeevashoka7948
@sanjeevashoka7948 5 жыл бұрын
thanks a lot. Sir also make video on some course related projects.....
@MsVulgar
@MsVulgar 6 жыл бұрын
Awesome 👍
@ashiqulhassan3990
@ashiqulhassan3990 4 жыл бұрын
thank you for this video
@PrasannaKumar-zx7gr
@PrasannaKumar-zx7gr 4 жыл бұрын
Thank you sir!!
@Sachin_-qs6he
@Sachin_-qs6he 2 жыл бұрын
excellent knowledge thank you sir
@nomanulhaq6601
@nomanulhaq6601 2 жыл бұрын
very helpful and easy to understand video
@beatroch
@beatroch 3 жыл бұрын
Thank you!
@Alberta_Farmer
@Alberta_Farmer Жыл бұрын
Further Enlightenment every ten minutes I gain when my attention I give to you))))
@preetisingh2008
@preetisingh2008 2 жыл бұрын
You are amazing.. Your explainations are more better then the school PDFs
@kartikey21-10
@kartikey21-10 Жыл бұрын
in which class you are ?
@rgowtham9445
@rgowtham9445 5 жыл бұрын
sir,thank u very much with beautiful english
@joothalal1858
@joothalal1858 5 жыл бұрын
Bihari Scammer Spotted
@sufiyanmogal1527
@sufiyanmogal1527 2 жыл бұрын
Nice Explanation Sir
@shirkhanaslanzade2406
@shirkhanaslanzade2406 4 жыл бұрын
thank you so much
@user-kv6wy5sb3m
@user-kv6wy5sb3m 3 жыл бұрын
yaa we enjoy the video thanks so much
@nitinrawat7581
@nitinrawat7581 5 жыл бұрын
Very helpful
@MANISHSHARMA-xk1su
@MANISHSHARMA-xk1su 6 жыл бұрын
Nice video sir....❤️
@susanshal5047
@susanshal5047 4 жыл бұрын
Nice explaination sir.
@raffaello182
@raffaello182 Жыл бұрын
you are a great teacher
@sourabhsharma3027
@sourabhsharma3027 5 жыл бұрын
Wonderful explanation
@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.....
@jyotigupta-be9oy
@jyotigupta-be9oy 4 жыл бұрын
Thank you sir,
Python Functions (The Only Guide You'll Need) #12
17:20
Programiz
Рет қаралды 558 М.
KINDNESS ALWAYS COME BACK
00:59
dednahype
Рет қаралды 137 МЛН
Who has won ?? 😀 #shortvideo #lizzyisaeva
00:24
Lizzy Isaeva
Рет қаралды 59 МЛН
КАРМАНЧИК 2 СЕЗОН 7 СЕРИЯ ФИНАЛ
21:37
Inter Production
Рет қаралды 536 М.
How I Would Learn Python FAST in 2024 (if I could start over)
8:01
DecisionForest
Рет қаралды 23 М.
#63 Python Tutorial for Beginners | Exception Handling
15:59
Telusko
Рет қаралды 502 М.
Functions in Python are easy 📞
10:38
Bro Code
Рет қаралды 415 М.
Functions in Python | Introduction | Python for beginners #lec56
24:07
Jenny's Lectures CS IT
Рет қаралды 118 М.
Dictionary in Python
12:24
Telusko
Рет қаралды 1,3 МЛН
Please Master These 10 Python Functions…
22:17
Tech With Tim
Рет қаралды 80 М.
Python Functions | Python Tutorial for Absolute Beginners #1
30:34
Programming with Mosh
Рет қаралды 925 М.
#49 Python Tutorial for Beginners | Class and Object
11:01
Telusko
Рет қаралды 809 М.
Choose a phone for your mom
0:20
ChooseGift
Рет қаралды 6 МЛН
Самый дорогой кабель Apple
0:37
Romancev768
Рет қаралды 337 М.