0:00
Hello and welcome to our first Python program
0:04
We'll talk about the code later. Before that, let us know a few things about Python
0:12
First thing is, Python scripts are almost like human language. Probably for this reason, Python is considered to be the
0:22
easiest programming language in the world. You need not use a lot of special characters or symbols
0:29
symbols all you need to remember is that indentation plays a very important role
0:36
in Python and for that indentation you don't have to worry because when you use a
0:44
code editor like Picherm you just press enter and look it has been indented
0:52
right so you don't have to worry about the indentation when we apply some special conditions inside our code this indentation is very very
1:05
important we'll see that in later videos first of all few things repeat in every
1:12
code right so if we can write it out in a separate file and just use them in every new Python file the general syntax structure code looks like this It a function So DEF means DEP is the short form of define
1:30
When we write a function, we usually start with DEF, then we write the function name
1:36
Here the function name is print high. And this is the parameter we have passed through the function
1:45
Now if you just move your cursor and just place it on name here the Picherm intelligence
1:57
shows you that parameter name of main dot print high name can be any right you
2:06
can pass instead of name you can pass a number no problem that is another
2:13
greatness of Python we'll talk about it later why we can do that because if you want to if you want to run
2:21
this program just click this button run button let's run and high pi churn okay now
2:29
we don want to pass a string instead we want to pass a number right let see what happens Hi 12 So Python is extremely flexible programming language
2:54
It proves that Python is extremely flexible programming language. In this second part, that means in this part
3:04
this is a special variable name. When it's double equal to main, we can call the main function
3:19
And since we have called the main function, we have defined and called the main function
3:27
Under the main function, we can call any function again. As a beginner, it might look a little bit daunting, but don't worry, we'll explain it later
3:44
Let us write another function
3:58
What we have done is a very simple thing. We have written another program and defined it and then call it inside the main function That is it So we can write more functions here and we can call them inside the main functions and they
4:15
will be executed one after another. In common programming term this is called syntax
4:23
That means rules like when you define a function you need to write it like this
4:31
You can pass a parameter through a function. You can pass more than one parameter
4:37
No problem. We can define another function and we can call them after only after defining them
4:47
You cannot call a function before defining it. These are syntax and these syntaxes mean that there are a few strict rules that we need to maintain while we
5:01
any kind of code in any kind of programming language it's not only true for
5:07
Python but it's true for every language in the next video we'll see how another
5:17
rule like indentation how it matters in Python in the next video we'll
5:22
discuss it in detail so till then goodbye stay safe and take care