Pages

Tuesday 24 July 2012

Python

                                        Starting Python
Python is a general-purpose, high-level programming language whose design emphasizes code readability. Its syntax is said clear and expressive. Python has a large and comprehensive standard library.
Python supports multiple programming paradigms, primarily but not limited to object-oriented, imperative and, to a lesser extent, functional programming styles. It features a fully dynamic type system and automatic memory management, similar to that of Scheme, Ruby, Perl, and Tcl. Like other dynamic languages, Python is often used as a scripting language, but is also used in a wide range of non-scripting contexts. Using third-party tools, Python code can be packaged into standalone executable programs. Python interpreters are available for many operating systems.
CPython, the reference implementation of Python, is free and open source software and has a community-based development model, as do nearly all of its alternative implementations. CPython is managed by the non-profit Python Software Foundation.Here is the direct link of downloading python.
                                                 
                                                            Download PYTHON here

Some useful facts & uses of PYTHON 

Python is often used as a scripting language for web applications, e.g. via mod_wsgi for the Apache web server. With Web Server Gateway Interface, a standard API has been developed to facilitate these applications. Web application frameworks like Django, Pylons, TurboGears, web2py, Tornado, Flask and Zope support developers in the design and maintenance of complex applications. Libraries like NumPy, SciPy and Matplotlib allow Python to be used effectively in scientific computing.
Python has been successfully embedded in a number of software products as a scripting language, including in finite element method software such as Abaqus, 3D animation packages such as Blender, Cinema 4D, Lightwave, Houdini, Maya, modo, MotionBuilder, Softimage, the visual effects compositor Nuke, and 2D imaging programs like GIMP, Inkscape, Scribus and Paint Shop Pro. GNU GDB uses Python as a pretty printer to show complex structures such as C++ containers. ESRI is now promoting Python as the best choice for writing scripts in ArcGIS. It has even been used in several video games, and has been adopted as first of the three available programming languages in Google App Engine, the other two being Java and Go.
For many operating systems, Python is a standard component; it ships with most Linux distributions, FreeBSD, NetBSD, OpenBSD and with OS X and can be used from the terminal. A number of Linux distributions use installers written in Python: Ubuntu uses the Ubiquity installer, while Red Hat Linux and Fedora use the Anaconda installer. Gentoo Linux uses Python in its package management system, Portage and the standard tool to access it, emerge. Pardus uses it for administration and during system boot.
Python has also seen extensive use in the information security industry, including exploit development.
Among the users of Python are YouTube, the original BitTorrent client, and Spotify Large organizations that make use of Python include Google, Yahoo!, CERN,NASA,ILM,and ITA. Most of the Sugar software for the One Laptop per Child XO, now developed at Sugar Labs, is written in Python.
In addition to standard desktop Python IDEs, there are also browser-based IDEs, such as NCLab and Sage, intended for developing science and math-related Python programs.
Now we know uses of Python we must now start building our programs we have already downloaded python from the above link and followed all the installation steps.To run the prompt we should Go to the start menu, find Python, and run the program labelled 'IDLE' (Stands for Integrated Development Environment. Now we have reached our window we see >>> marks already printed on our window then we type 
 print "Hello, World!"
The result or output of above code will be Hello, World!
Php Math Operators:-

                       Python operators
command   name    example output
+        Addition        4+5             9
-      Subtraction        8-5             3
*    Multiplication        4*5             20
/       Division        19/3             6
%     Remainder                19%3     5
**      Exponent         2**4     16


So for performing mathematical operations we use the following syntax:
(operand)(operator)(operand) like 10+20 then press enter will give output 30.Similarly for complex calculations we may use brackets Please Note that our IDLE or Python follows the fundamental rule of DMAS OR BODMAS that means (Bracket Open Devision Multiplication Addition Subtraction).


No comments:

Post a Comment