Page 349 - AI Ver 1.0 Class 9
P. 349

30.  Write syntax for "greater than or equal to" operator.
              Ans.  a>= b.
               31.  Is "<" a Assignment operator?

              Ans.  No,"<" is not assignment operator.
               32.  Optimize these statements as a Python programmer.
                  1 word 'word'
                  2 print word. len()
              Ans.  1 word = 'word'
                  2 print len(word)
               33.  How many types of operations are supported by the Python language?
              Ans.  Python language supports the following types of operations.
                  a.  Arithmetic operations                          b  Comparison (i.e., Rotational) operations
                  c.  Assignment operations                          d.  Logical operations

                  e.  Bitwise operations                             f.  Membership operations
                  g.  Identity operations
               34.  Why do you use 'break' statement?
              Ans.  The 'break' statement can be used to terminate the loop.

               35.  Write the syntax of an 'if' statement in Python programming language.
              Ans.  if expression :
                  statement(s)
               36.  Write the syntax of an if.....else statement in Python programming language.
              Ans.  if expression: statement(s) else:

                  statement(s)
               37.  Define while loops.
              Ans.  A while loop statement in Python programming language repeatedly executes a target statement as long as a given
                  condition is true.
               38.  Write the syntax of a while loop.
              Ans.  The syntax of a while loop in Python programming language is : while expression :
                  statement(s)
               39.  What happened when the condition of while loop becomes false?
              Ans.  When the condition becomes false, program control passes to the line immediately following the loop.























                                                                                  Viva Voce Questions  347
   344   345   346   347   348   349   350   351   352   353   354