Page 282 - AI Ver 1.0 Class 9
P. 282
• 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 makes its code efficient
and reusable with important features like polymorphism, inheritance, data encapsulation, etc.
• Supports GUI: Python supports 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 specially in AI-based programs where we need to
focus more on its use and not in its core design.
Role of Python in Artificial Intelligence
Python is most popular language for Artificial Intelligence is based on the facts given below:
• Built-in Libraries: Many built-in modules and packages in Python reduces development time and effort to
design code for Artificial Intelligence. There are Numpy for scientific computation, PyBrain for Python Machine
Language, Scipy for advances 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 helps a programmer to customise
their tools in an efficient manner.
• Availability of Data Analysis Tools: Libraries like Matplotlib helps data scientists to build charts, histograms, and
plots them for easy comparison of data which is important for creating data analysis reports with visual effects.
• Community Support: Python being one of the 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 worked to be an important factor for using python in AI design.
Important uses of Python
Following are some uses 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.
• Scientific and Numeric Calculation: SciPy, Pandas, Ipython are some of the built-in packages in Python which
are used for scientific and numeric calculations.
• Game Development: PySoy (a 3D game engine that supports Python 3) and PyGame are two Python-based
libraries used widely for game development. Most of the popular games like Battlefield 2, Frets on Fire, World
of Tanks, Disney’s Toontown Online, etc. are designed using Python game libraries.
• General-Purpose Software Development: Python is used for all purpose software development. It also
supports audio and video files that help in designing multimedia applications.
Installing Python
Windows does not come with Python as default installed in it. We need to download from the official website.
The steps to download and install Python are:
1. Open the official website https://www.python.org/downloads.
2. Click on the Download Python 3.9.x button. The installer file will start downloading.
280 Touchpad Artificial Intelligence-IX

