Python is a very powerful and simple languages. Python is an interpreted programming language, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development. Basically python run interpreter from script. Python syntax are very easy, you can easily remember them. Its a languages which not want any ending tag or any notation like other languages. If you are the beginner in programming and you know C,C++ basic concepts then you can easily understand this languages because it is a very easy language.
Below i am showing you how to work in python by the help very easy examples . Before going to example side first install python in your desktop/laptop.
For window :
Visit https://www.python.org/downloads/ and download the latest version.
- Right click on Computer from your desktop and select Properties or click
Start and choose Control Panel → System and Security → System .
Click on Advanced system settings on the left and then click on the
Advanced tab. At the bottom click on Environment Variables and under
System variables , look for the PATH variable, select and then press Edit .
- Go to the end of the line under Variable value and append ;C:\Python27 (please
verify that this folder exists, it will be different for newer versions of Python) to the
end of what is already there. Of course, use the appropriate folder name.
- If the value was %SystemRoot%\system32; It will now become %SystemRoot
- Click OK and you are done.
For Linux/Unix :
Python must be installed already. To verify, open the terminal by opening the Terminal application or by pressing Ctrl+Alt+T and entering gnome-terminal . If that doesn’t work, please refer the documentation of your particular GNU/Linux distribution. Now, run python and ensure there are no errors.
You can see the version of Python on the screen by running:
developer@yours:~$ python -V Python 2.7.3
First Python Example
Open the terminal in your operating system and then open the Python prompt by typing python and pressing enter key.
Once you have started Python, you should see >>> it means your python interpreter is ready .
At the Python interpreter prompt, type:
print "Hello world"
Note: Not use any semicolon at end of any command or syntax
>>>1 + 1 2 >>> 20+80 100 >>> 10000+99 10099 >>> 6-5 1 >>> 2*5 10 >>> 5**2 25
As you seen that python has not required any semicolon etc. because it is working on white-space system, Which help us very much so for that reason python is very easy languages. Best of luck 🙂