Page 15 - Modular v1.1 Pyhton
P. 15

On the output screen, Name is Deepak, Age is 12 and Grade is VII will be printed.

                 You must follow the given rules while creating and naming the variables:

                    A variable name must start with a letter or underscore character.

                    A variable name cannot start with a number.

                     A variable name can only contain alphanumeric characters (all the letters of the alphabet and
                     numbers) and underscores (_).

                    Variable names are case-sensitive.

                     Variable names cannot contain any special character or symbol.


                    Recap


                          Python is a popular high-level programming language.

                         Interactive Mode is a command line shell which gives immediate result for each command.
                         IDLE stands for Integrated Development and Learning Environment.
                         The input() function takes the user’s input while a program executes.
                          The print() function prints or sends the output to the standard output device, which is usually
                         a monitor.
                          Variables  are  memory reference  points where  we  store  values which  can  be  accessed or
                         changed later.





                                                        Exercise



                 A.   Tick ( ) the correct option.
                     1.    Which of the following can be developed by using Python?

                          a.   Games                                    b.   Websites

                          c.   Graphical user interface programs        d.   All of the above
                     2.   Which of the following does the menu bar of the Python IDLE window contain?

                          a.   File                                     b.   Edit
                          c.   Shell                                    d.   All of the above
                     3.    Which of the following mode saves the commands entered by the user in the form of a program?

                          a.   Interactive mode                         b.   Script mode

                          c.   Both a and b                             d.   All of the above
                     4.   Which of the following function takes the user’s input while a program executes?

                          a.   input( )                                 b.   output( )
                          c.   print( )                                 d.   None of the above


                                                                                         Introduction to Python   13
   10   11   12   13   14   15   16   17   18   19   20