Page 375 - Ai_417_V3.0_C9_Flipbook
P. 375

• Easy to Learn and Use: Python has simple, English-like statements that are easy to learn and use. Anyone can
                   easily get used to its syntax and have expertise in it.
                    • Expressive Language: Python supports simple code that expresses itself in a few lines to do big and complicated
                   tasks.
                    • Free and Open Source: Python code is developed under an OSI-approved open-source licence, which allows it
                   to be downloaded free of cost from its official website, https://www.python.org. The code can be modified and
                   distributed further, even for commercial purposes.
                    • Cross-platform Language: Python supports multiple platforms, like Windows, Linux, Mac, Raspberry Pi, etc.,
                   which means code written on one platform can easily run on another platform with little or no changes.
                    • Interpreted Language: Python uses an interpreter where the source code is converted and executed line by
                   line at a time.
                    • Object-Oriented Language: Python supports the concept of classes and objects that make its code efficient
                   and reusable with important features like polymorphism, inheritance, data encapsulation, etc.
                    • Supports GUI: Python supports a Graphical User Interface which makes its more user friendly and easy for the
                   programmers to design code.
                    • Large Standard Library:  Python  has  some  built-in  modules  and  packages  for  doing  some  standard  and
                   common tasks. These important libraries make it popular, especially in AI-based programs where we need to
                   focus more on its use than its core design.
                    • Portability and compatibility: It refers to the ability of Python programs to run on various types of computer
                   systems and operating systems without modification in the code.
                    • Database and Scalable: Python provides strong support for database interactions, allowing developers to
                   efficiently connect, manipulate, and query databases with good support for the growth of applications in terms
                   of performance, complexity, and data size.

                         Role of Python in Artificial Intelligence


                 Python is the most popular language for Artificial Intelligence based on the facts given below:
                    • Built-in Libraries: Many built-in modules and packages in Python reduce the development time and effort
                   required to design code for artificial intelligence. There are Numpy for scientific computation, PyBrain for Python
                   Machine Language, Scipy for advanced computing, Pandas for general-purpose data analysis, and many more.
                    • Platform Independence: Python has this versatile nature of running the code in any platform like Windows, MacOS,
                   Linux, Unix, etc. Packages like PyInstaller can be used to prepare the code that can run on different platforms.

                    • Extensible: We can add low-level modules to the Python interpreter that help a programmer customise their
                   tools in an efficient manner.
                    • Availability of Data Analysis Tools: Libraries like Matplotlib help data scientists build charts and histograms and
                   plot them for easy comparison of data, which is important for creating data analysis reports with visual effects.
                    • Community Support: Python, being one of the most popular languages, has attracted a lot of developers to
                   design online forums and online tutorials to provide assistance related to different types of programming in
                   Python. This community support has been an important factor in using Python in AI design.

                         Applications of Python

                 Following are some applications of Python:

                    • Used for Web and Internet Application Development: Python has pre-built libraries and web frameworks
                   like Pyramid, Django, and Flask, which are used for backend web development projects. Some standard libraries
                   also support content design, database connectivity, and many Internet protocols like HTTP, SMTP, XML, etc.

                                                                                        Introduction to Python  373
   370   371   372   373   374   375   376   377   378   379   380