Page 340 - AI Ver 1.0 Class 9
P. 340

S. No                          Questions                                      Answers
              6     Find out the syntax errors and rewrite the correct code and  name=input("enter name :")
                    underline it:                                              if name="abc":

                    input("enter name :")=name                                       print("login allowed")
                    if name="abc"                                              else:
                          print("login allowed’)                                     print("Sorry!")

                    else:
                          print(Sorry!)
              7     Give the output of the given code:                         10

                    a=15
                    b=10
                    c=2

                    d=a+b//c-10
                    print(d)
              8     What will be the output of the given code?                 20 40

                    p=10
                    q=20
                    a, b=p+10, q+20
                    print(a, b)

              9     What is the data type of ‘123’?                            d
                    a)  int

                    b)  float
                    c)  boolean
                    d)  string

             10     Choose the correct option:                                 a
                    print(int(False)+10)

                    a)  10         b)11           c)0            d)False
             11     What is the data type of 12.5//2?                          b

                    a)  int (integer)
                    b)  float (floating number)
                    c)  bool (Boolean)

                    d)  str (string)













                  338   Touchpad Artificial Intelligence-IX
   335   336   337   338   339   340   341   342   343   344   345