Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 153 - 2633 Trackpad Pro V5.1 Class 7
P. 153

    21 st
                        LAB ACTIVITY                                                        Century   #Technology Literacy
                                                                                             Skills
                         Visit your computer lab and perform the following actions:

                             Write a program to enter two numbers and print their exponent.
                             Write a program to calculate the perimeter of circle.
                             Write a program to calculate average of 5 numbers.

                              COding Zone       COding Zone    {}      =     COding Zone
                                                                                               21 st
                                                                                                  #Technology Literacy
                                    {C ding z ne}
                                                                                            Century
                                                                                                  #Critical Thinking
                                                                                              Skills
                                                                              </>
                         1.  Choose the valid identifiers from the following list:
                            a.  My_var                              b.  2var
                            c.  Sum_of_numbers                      d.  my@var                     e. _init
                         2.  Finding the output of the following Python code:

                             a. print(5 + 3 * 2)                    b.  print(True and False)
                            c. x = 5                                d.  print(7 % 3)

                             x += 3
                              print(x)

                         3.  Finding the errors in the following Python code:
                            a. print("Hello World)                  b.  Print "python"

                           c.  print(5 / 0)
                         4.  Which of the following declarations is incorrect?

                            a.  _a = 2                              b.  a = 2
                            c.  while = 2                           d.  a_1=2

                           CAREER HERE

                     People who are expert in Python may pursue their career as a software developer.

                        FOR THE TEACHER
                       1.  Explain various types of data types in detail.
                       2.  Give small programs related to interesting, real-life examples to the students.

                                                                                        Tokens and Data Types in Python  151

| 148 149 150 151 152 153 154 155 156 157 158 |