[tutorial] Learn Python Programming Language

in #utopian-io7 years ago

introduce

Getting started with programming using python programming is easy. Basically in every distribution of the linux distro, python is included in the package by default. We can write scripts using python IDE like IDLE or write it using text editor. Incidentally when writing this article I use Ubuntu Mate on raspberry device pi 2.
As usual to start the first application created using python, we will create 'hello world'. I use a text editor, the script looks like this:

capture-20171218-045512.png
Then save the file with the name hello.py. In order to run the file we need to change it so it can be executed. This is done through the terminal, I will not explain the commands on the linux terminal. The commands are as below:
capture-20171218-045819.png
And to execute the file type this command:
capture-20171218-050027.png

Use of Variables In Python

Writing a variable in python on its principle is the same as writing a variable in another programming language. There are rules to follow, like this:
capture-20171218-050920.png
capture-20171218-051043.png
capture-20171218-051556.png
Here's an example script to create a variable:
capture-20171218-052003.png
capture-20171218-052846.png
Below is an example script using the operator:
capture-20171218-053106.png

by ;
@steemitbird



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

helpfull post

tnx for share

You are welcome

Your contribution cannot be approved yet because it is not as informative as other contributions. See the Utopian Rules. Please edit your contribution and add try to improve the length and detail of your contribution (or add more images/mockups/screenshots), to reapply for approval.

You may edit your post here, as shown below:

You can contact us on Discord.
[utopian-moderator]