Page 427 - AI Ver 3.0 class 10_Flipbook
P. 427

Python as a language supports simple English-like statements making it easy for programmers to learn and
                 maintain the code. It has both procedural and object-oriented programming approaches. These important points
                 make it more popular among the programmers.


                         Why Python for Artificial Intelligence?


                 There are many programming languages like Lisp, Prolog, C++, Java and Python, which can be used for
                 developing applications of AI. Python gained its popularity due to the following reasons:
                    • It is easy to Read, Write, Learn and Maintain: It has simple English-like statements which are easy to learn
                   and use. Anybody can easily get used to its syntax and gain expertise in it.
                    • Large Standard Library: Python has a large number of built-in modules and packages for handling various
                   types of problems especially related to AI. These important libraries make it popular specially in AI-based
                   programs where we need to focus more on its use and rather than its core design.
                    • Interactive Mode:  The  interactive  mode  in  Python  provides  flexibility  of  testing  and  debugging  the  code
                   snippets before implementing in actual AI model.
                    • Portability and Compatibility: 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.  It
                   has the same interface on all platforms.
                    • Extendable: It allows the addition of low-level modules to the Python interpreter that helps a programmer to
                   customise their tools according to their requirements in an efficient manner.
                    • Databases and Scalability: Python provides support to all types of databases along with a better structure
                   and support so that it can hold increasing amounts of data without sacrificing performance for much larger
                   programs than shell scripting.

                                                                 High Level

                                             Interpreted                               Simple






                                  Object Oriented                                         Open Source







                                  Expressive Language                                GUI Programming

                                                           Large Standard Library



                         Applications of Python



                 Python is used for a variety of applications. Some of them are listed below:
                    • It is used for Web and Internet Development: Python has pre-built libraries and web frameworks like
                   Pyramid, Django, and Flask, which are used for back-end web development projects. Some standard libraries
                   also support content design, database connectivity and many internet protocols like HTTP, SMTP, XML etc.

                                                                                    Advance Python (Practical)  425
   422   423   424   425   426   427   428   429   430   431   432