Page 123 - Trackpad_V5_Book 6
P. 123

Program 2. Write a program to add two numbers.








            Program 3. Write a program to calculate the average marks of three subjects.













                   Hashtag

                 #Python: Object-oriented high-level programming language
                 #IDLE: Stands for Integrated Development and Learning Environment



                  REVISIT



              ▶   Interactive mode and Script Mode are the two working mode in Python.
              ▶   The input() function takes the user’s input while a program executes.
              ▶   The print() function is used to display the content on the screen
              ▶   Variables are memory reference points where we store values which can be accessed or changed later.
              ▶   A data type specifies the type of value a variable can contain.
              ▶   Comments enable us to understand the way a program works.
              ▶   Operators are special symbols which perform computation.










            1.  Tick ( ) the correct option.

               a.  Python can be used for __________.
                   (i)  Web Programming Development                  (ii)  Data Analysis
                  (iii)  GUI Application Development                 (iv)  All of these

               b.  Which function is used to display the content on the screen in Python?
                   (i)  print( )                                     (ii)  scan( )
                  (iii)  display( )                                  (iv)   input()

               c.  Which of the following allows to save the programs for further use?
                   (i)  Python Shell                                 (ii)  Python Editor’s window

                  (iii)  Command Prompt                              (iv)  All of these


                                                                                        Introduction to Python  121
   118   119   120   121   122   123   124   125   126   127   128