Free Python programming for beginners- Tutorial- Functions - Def() functions - Efficient programming
Subscribe Here -https://www.youtube.com/@KeeshtuTechn...
#python #pythonprogramming #pythontutorial #pythonforbeginners #youtubechannel #pythoninstallationcomplete #pythonhowtoinstall #pythoninstall #pythondownload #pythontutorialfree #pythonyoutube #pythonenglish #pythonenglish #pythonexecvseval #pythonexec()vseval() #pythonexec() #pythoneval() #youtubeviews #pythondef #pythondef() #pythonfunctions #pythonbreak #pythoncontinue #pythonpass #pythonzip #pythonunzip #pythonprintescapecharacter #pythonrepr() #pythonr
Please Captions on - Python in English, Python in Tamil, Python in Telugu, Python in Malayalam, Python in Chinese, Python in Japanese, Python in German, Python in Hindi, Python in French
welcome to technology platform so today we are going to see like how to use functions in python so we always like to reuse the functions I don't want to write the code multiple times I just want to write some code and store it in some function and I have to recall that function in my code so this is what we have to see it today let me open idle now for this the syntax is like def is a keyword and function name and then arguments you need to provide it so this is what uh the Syntax for this user defined function so we can say like this is user defined functions now I'm always using like welcome to python programming so this is I want to print it now this I want to store it in some place whenever I will call the function it should print this now see this ref print
welcome message and colon this is important and then enter print of I'll write this
now it won't return now now let's see we have to call this function [Music]
now run it
Python programming so like this you can reuse somewhere wherever we need these functions we can use it and then the second thing is like arguments so I want to pass something for example um yes def then we can say like um print name address or we can say like print course and chapter this is the function I'll say like course I want to pass it chapter I want to pass it colon enter print off
course comma chapter [Music] I I'll say like um single quotes hyphen comma like this I store it I want to pass it like this one
I'll say like python chapter
I'll say like 10. let's see without arguments Let's uh single course let's see and with with arguments let's see what will happen so that it is easy to understand because we need to pass it um some data type or something like that we can check it now itself how it works here
let me run this now and then let's see oh sorry the colon should not be there [Music] enter so here you can see python 10. so whenever you can run it
it should print whatever we display like if you say like Java five it it returned Java hyphen 5. so this is called a simple uh Dev functions how to create it and how to reusable I just provided it but see you in the next session in detail Dev functions everything thank you bye