Page 71 - Computer Genius Class 07
P. 71

3.  Define the term functions in programming.




                    4.  Explain how arrays are indexed in programming.






                    5.  How do you search a particular value from an array in Python?






                    6.  Write any two advantages of array.







                                                                                      Computational Thinking
                      FUN ZONE                                                        Information Literacy

                   A.  Find the error in the following code and rewrite the code:

                       1.  if(age > 18)
                               print(‘You are eligible to vote’)
                          else:

                               print(‘Not eligible to vote’)
                       2.  num = int(input("Enter a Number: "))

                          if num > 10
                               print("Number greater than ten"):
                          elif num < 10:

                               print("Number less than ten")

                          else:
                               print("")
                       3.  arr=(10, 20, 30, 40, 50, 60):

                          print(index.arr("60"))
                        .   nput first num er   um2

                          Input second number (Num1)
                          Sum = Num3 + Num2
                          Print SUM









                                                                                Advanced MakeCode Arcade      69
   66   67   68   69   70   71   72   73   74   75   76