Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 99 - 2617_JSSPS_C-8
P. 99

    3.   “Python is Integrated and Extensible Language.” Enumerate this statement.

                            4.  What is a prompt in Python IDLE?

                            5.  Aruna has typed the following line of code in interactive mode:

                               # print("Enter your name")
                                What will she get when presses the Enter key? Why?

                            Scratch Your Brain.                                             21 st  Century   #Technology Literacy
                                                                                                Skills
                                                                                                    #Productivity & Accountability
                            1.  Write the outputs of the following programs:
                                a.  x = 10

                                  y = 5
                                  z = 7
                                  result = (x + y) * z - 2
                                 print(result)

                                b.  age = 25
                                  is_adult = 18 <= age < 65
                                 print(is_adult)

                                c.   total = 0
                                  total += 5
                                  total *= 2
                                  total -= 3
                                 print(total)

                                d.  x = 10
                                  y = 5
                                  z = 7
                                  result = x ** 2 + (y * z) // 3 + (x % 2) * y
                                 print(result)
                            2.  Rewrite the following statements correctly.

                                a.  PRINT("Welcome")

                                b.  print("Result,result")

                                                                                               Introduction to Python   97

| 94 95 96 97 98 99 100 101 102 103 104 |