Page 323 - AI Ver 1.0 Class 9
P. 323

3.  In branching statement, condition evaluates to either ………………………. or ………………………. .

               4.  Algorithm is ………………………. approach to identify and solve a problem.
               5.  Python is an ………………………. language.

               6.  Remainder operator and floor division are ………………………. operators.
               7.  ………………………. and ………………………. are two different ways of writing comments.

               8.  The ………………………. function is used to find the data type of the objects.

               9.  A ………………………. is a set of instructions given to a computer to do a specific task.
               10.  Conditional programming allows a block of statement to be executed based on a …………………. .

               11.  There are ………………………. ways to repeat a set of instructions in Python.
               12.  While loop is also called ………………………. loop.

               13.  List is a collection of ………………………. data arranged in a sequence.
               14.  List is a ………………………. data type in python.

               15.  The index number begins with 0 till length-1 in ………………………. .

            C.  Find the errors in the given code and write the correct code:
               1.  a = input("enter a number)

              Ans.  a = input("enter a number")
               2.  b + c = a

              Ans.  a = b + c
               3.  print("hello + Friends")

              Ans.  print("hello" + "Friends")
               4.  marks==total/2

              Ans.  marks=total/2
               5.  a=input(int("enter marks"))

              Ans.  a=int(input("enter marks"))
               6.  num#1 = 100

                  if (num == 100)
                      print (Number is: num
                  print ("Thanks!")
              Ans.  Correct code is:
                  num = 100
                  if (num = 100)
                      print ("Number is:", num)
                  print ("Thanks!")
               7.  5=a
                  b=int(input(ENTER value for b))
                  if a<b
                      print('a is bigger")
                  Else:
                    print("b is bigger"



                                                                                Introduction to Python  321
   318   319   320   321   322   323   324   325   326   327   328