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

• Desktop and GUI Applications:  Python provides the Tkinter library,  which can be used to develop user
                 interfaces for desktop applications.
                 • Database Access: Python provides database access by supporting different varieties of databases like MySQL,
                 GadFly, mSQL, PostgreSQL, Microsoft SQL Server 2000 etc.
                 • Business Applications: Python provides business Applications for e-commerce, ERP etc. due its highly scalable,
                 extensible and easily readable feature.

                 • Scientific and Numeric Calculation: SciPy, Pandas, NumPy are some of the built-in packages in Python which
                 are used for scientific and numeric calculations.

                 • Game Development and 3D Graphics: PySoy (a 3D game engine that supports Python 3) and PyGame are
                 two Python-based libraries used widely for game development. Many popular games like Battlefield 2, Frets
                 on Fire, World of Tanks, Disney’s Toontown Online etc. are designed using Python game libraries.

                 • Software Development: Python is used for general-purpose software development. It also supports audio and
                 video files that help in designing multimedia applications.

                       Recap of Python Basics


              Python as a programming language was introduced in class 9 in detail. Let us now do a quick recap of some
              important concepts and syntax necessary for writing a programs.
              Python Character Set

              A character set can be a set of valid characters like:

                 • Digits from 0 to 9.
                 • Alphabets in upper or lowercase from A to Z or a to z.
                 • Special symbols like $, %, ^, &, *, (, ), @, !, _, ~.
                 • Whitespaces like spacebar, tab key or enter key.
                 • ASCII or UNICODE Characters like emoji symbols or other symbols with unique code.
              What is a Statement in Python?


              Instructions written in a source code and are executed by a Python interpreter are called statements. In Python
              we can write statements in 3 different ways. Let us learn about them in detail.

              Simple Statements

              By default, the end of a statement is done by pressing an Enter key. Each statement is written on a new line. For
              example, a=5 is a simple statement where variable a is created with value 5.

               [1]:   a = 5

              Multiline Statements

              In Python, a statement that doesn't fit on one line can be extended over multiple lines. This can be done in
              several ways:

                 • Using Parentheses (): You can break a long expression or function call across multiple lines if it is enclosed in
                 parentheses. Python allows this without any additional special characters.


               [1]:   result = (11 + 15 + 148 +
                                154 + 87)


                    426     Touchpad Artificial Intelligence (Ver. 3.0)-X
   423   424   425   426   427   428   429   430   431   432   433