Page 129 - TechPluse_C7_Flipbook
P. 129

Restart


                        Python is a popular high-level programming language.
                        Interactive Mode is a command line shell which gives immediate result for each command.
                        IDLE stands for Integrated Development and Learning Environment.

                        The input() function takes the user’s input while a program executes.
                        The print() function prints or sends the output to the standard output device, which is
                      usually a monitor.
                        Variables are memory reference points where you store values which can be accessed or

                      changed later.
                        A data type specifies the type of value a variable can contains.
                        Comments enable you to understand the way a program works.
                        Operators  can  be  defined  as  special  symbols  which  perform  arithmetic  and  logical
                      computation.

                        Arithmetic operators perform arithmetic operations between two operands.
                        The assignment operators are used to assign the value of the right expression to the left
                      operand.
                       Relational operators are used to compare the value of the two operands and returns

                      True or False accordingly.
                        Precedence of operators determines the order in which the operators are executed.




                                                          Checkpoint





                 A.   Tick ( ) the correct option.

                       1.     What will be the output of the following expression?
                            22 % 3
                            a.   7                                      c.  1

                            b.  0                                       d.   5

                       2.   The statement using AND operator results true if .........................

                            a.   both operands are true

                            b.  both operands are false

                            c.   either of the operands is true
                            d.  None of these






                                                                                         Introduction to Python      127
   124   125   126   127   128   129   130   131   132   133   134