Python is the most popular programming language at the moment, which means if you want to create any applications (either desktop, web, or mobile phone) you will need to use python or other programming languages such as Java, C++, and C# to write it. As compared to the other programming languages, Python is a lot easy than them all and the third-party modules of Python basically can match those of Java, C++, and C# which means you do not need to worry that you will need to write a certain feature of your program by your own because you can always include those third-party modules in your own Python program. If you want to create a window store application you do not need to use C# or C++, instead you can directly use Python to write those windows applications and then submitted them to the windows store! So there you are, Python programming language simply has countless usages that waiting for you to discover them out by yourself. In this chapter, I am just going to show you the basic of this programming language and see what it can do even without writing a single line of code.
Just like what I have promised you all, in this chapter, I am not going to write a single line of code which I will save for the next chapter.
If you want to write a python program or even use python modules you will need to install Python on your computer first. Go ahead to this Python main page and install Python and I will wait for you to return to this page.
After you have installed Python on your computer, open up the PowerShell application in windows and type in the below line to find out whether you have installed Python correctly or not.
python --version
If Python has been installed correctly on your computer then the version of python will appear on the PowerShell console.
Now, in order to use python, very easy, just type into PowerShell. After you have seen this >>>, then it is time to do some calculations…
type in 2+1 then enters to find out what 2+1 equals. Do the same to 3 * 2, 4 / 5, 6 – 9, etc to find out the results.
Let’s do the power of 3…
2**3 // result is 8
At last, let’s joined two strings into one like this…
>>>a = "Hello " [enter] >>>b = "World!" [enter] >>> c = a + b [enter] >>> c [enter]
And that is the main dish of today “Hello World!”.
Hope you like this first chapter of learning Python programming language, if you like this one don’t forget to subscribe to my blog as well as share this page with your friends, see you in the next chapter!
* Just in case you ask me why am I using PowerShell to write the python programs, well, you do not have to, you can use command prompt as well, it is just because I am learning PowerShell now thus I am using it as a demo to write Python commands in this chapter!