Functions
functions
function is a block of code that can only run when it's call functions can break your program to small
arms to do any specific job of the program.
It also makes your life easier to do.
Now use a block of code multiple times to define a function just type the key keyword there if your
function name parentheses call and then you block of code.
Let's see how.
All right.
Now I'll show you how to use functions.
Make sure to know functions really well.
It's really really important and makes your life easier with Kerl and you really need to know functions
if you want to learn Python.
So go to bracket's
to define a function.
Typedef keyword.
And then your function name re-emphasis colon then your block of code such as Phryne entering.
Hello this is code from the function.
Also indentation is super important in Python.
Make sure of that.
So if you take the indentation out you will be out of the function and you will be in your main program.
In the main program I will type print a string.
This is code from all main program backslash and to show you it's from the main program.
So to call the function from your main program easily type the function name and its parenthesis.
If there's arguments you need to type them also.
I will show you what's arguments in the next lectures after that try that and turn
beautiful as you can see your function works well.
In the mean program that's all for now.
You need to track these functions in your own computer.
Thank you very much.