Artcafe Easy Programming Learning - Python programming part 1

ArtCafe
6
Python is a High level programming language that used to build computer programs. Python language usage is very easy than other computer languages. Also we can learn python easily. When we heard "python",just we remind a snake. But there is a no connection to the python programming language. In end of 80th decade, Python programming language introduced by Guido van Rossum. Python is use to computer program, as well as python used as a web scripting language for build web applications. 

Now let's see how do we install python on your computer. Please follow steps below. 
  • Step 1 - We have to download the compatible version of the python for your operating system.
Easy Programming Learning - Python programming
  • Step 2 - After downloading the installer, install it similar to other installers double clicking the setup.
  • Step 3 - Go to start menu, and find the folder named Python. Then click on the IDLE. IDLE means Integrated Development Environment.
Easy Programming Learning - Python programming
  • Step 4 - then you can open the python shell. You can compile all the python codes in this shell. There is a description about  the version of python. We can start write codes after the >>> sign.
Easy Programming Learning - Python programming

We can run our written codes inside the Python shell. But if we write long codes, we should use another window. You can open that window using selecting New File in the  file menu drop down. Or just you can open it pressing Ctrl+N.


Lets write our first python program.
There are two ways to write python programming codes.

Interactive mode programming 


In this method we can write commands in the python shell and execute that codes. 

Script mode programming 


In this script mode programming method we write the commands in external script file, then we execute that script file. When the script is finished, executing process of the python program come to end. 

In our first python program, i will explain how to print something on the python shell. I will do this example in both methods. For that we have to use the print function in the python.

Interactive mode


Open the python shell and type print("Welcome to Python Programming");, then press enter key. It will print Welcome to Python Programming on the shell. You can use any words inside the double quotations.
Easy Programming Learning - Python programming

Script mode

If we use script method, we have to write python commands in external script file. So we have to take that external file. For that, click on the file tab, and select the New File (File-> New File)
Then you will have a new window. You can write the commands that you want to print on the shell. 


For example -
print("hello world");
print("Lets learn Python Programming");

Easy Programming Learning - Python programming

Now we have to save this new file. Go to File tab and select Save. We can write a specific file name and we should select the save as type is Python files(*py,*pyw). After that we can run our new file. Just go to Run tab on the menu bar, then select Run Module. Or just press the key F5. Then we can see the output in the python shell.

Easy Programming Learning - Python programming

Like the examples,we can print anything on the python shell. You can try difference words and have a experience using the python shell. 

If you have any problem or error when installing python or executing commands please write them on a comment box. I will help you to resolve that problems. As well as if you have any suggestions or complain please feel free to comment.  Thank you. See you in next python programming lesson.

Post a Comment

6Comments
Post a Comment