Page 205 - AI Ver 1.0 Class 10
P. 205

Reboot


                        • What are conditional statements?








                        • What are the different kinds of loop?















                           At a Glance


                       • Anaconda is a popular, free and open-source distribution of Python and R for Windows, Linux, and macOS.
                       • Jupyter Notebook is an open-source web-based application where a single document contains Python code, output
                       window, explanations, formulas, charts etc.
                       • A virtual environment is an important tool that helps you create a unique isolated environment for each project in
                       Python.
                       • Python is a general-purpose, object oriented, easy to learn high-level programming language.
                       • Instructions written in a source code and are executed by a Python interpreter are called statements.
                       • Comments are used to increase the readability of the code. We use it to give proper understanding of the code in
                       simple English statements. In Python we can give single line or multi line comments.
                       • Keywords have special meaning which are reserved by Python for special purposes and are not allowed to be used
                       as identifiers.
                       • Identifiers are the user-defined names of variables, lists, classes, functions, dictionaries, tuples, etc. which are used
                       to identify an element in Python.
                       • Variable is a name given to a memory location to hold a specific value.
                       • Data types specify the kind of a value a variable can store.
                       • Operators are used to perform operations on variables and values.
                       • Type conversion is the process of converting the value of one data type into another data type to match the
                       operation required to be performed by the code.
                       • Conditional statements are used for selecting the block of statements to be executed based on the condition. We
                       specify the condition in the program which evaluates to either True or False.
                       • The process of repetition of a set of instructions based on a criteria is called a loop. There are two kinds of loop in
                       Python: for loop and while loop.
                       • The for loop is used to repeat a set of instructions for a fixed number of times. It means when the number of
                       iterations is known/ definite before we start with the execution of a loop.
                       • The while loop is used to repeat a set of instructions as long as the condition is true. It means when the number of
                       iterations is not fixed/indefinite before we start with the execution of a loop.








                                                                                           Advance Python   203
   200   201   202   203   204   205   206   207   208   209   210