Page 32 - 2501_KVS_C-7
P. 32

3               PYTHON PROGRAMMING









                 Your Aim

                  3.1  Basic Programming
                          3.1.1   Writing and Compiling a Program
                       3.1.2  Creating First Program
                       3.1.3  Understanding print() Function
                       3.1.4  Creating Simple Programs
                  3.2  Python Programming – Decision
                       Structure
                       3.2.1  Inputting Values
                       3.2.2  Decision Structure
                       3.2.3  Practice





                  3.1 BASIC PROGRAMMING
                  Programming is the process of writing precise instructions that tell a computer exactly how

                  to perform a task.

                  3.1.1 Writing and Compiling a Program

                  You have learned the basics about Python programming language. In this section, you will
                  learn how to open Python IDLE (Integrated Development and Learning Environment), write
                  a program and execute it.

                  To create and run a Python program, you need to do the following steps:

                  1.   Open IDLE’s editor window to write your program.

                  2.   Save your program with .py extension.
                  3.   Run the program by pressing the F5 key (IDLE automatically compiles it first).


                  Step 1:   Click on Start Button


                  Step 2:   Select the  Python               IDLE


                                                and you will get

                             the following screen.




                30                         KVS DELHI REGION 2025
   27   28   29   30   31   32   33   34   35   36   37