Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 145 - 2612 Digimind C6
P. 145

    EXITING PYTHON IDLE

                     After we are done writing our program, we can exit Python IDLE. To exit from Python IDLE, follow
                     the steps given below:

                                      1  Click on the File menu.

                                                                              Subject: Exit Python IDLE

                                                                              To exit Python IDLE. Type exit() in
                                                                              front of the command prompt and
                                                                              click on OK button.

                                  2  Click on the Exit IDLE option.

                               MORE PROGRAMS

                     Program 1. Write a program to input your name, school name and also print.

                         Program1.py
                      File  Edit  Format  Run   Options   Window    Help

                      # Store Input Data
                      name = input(" Enter your name: ")
                      school_name = input(" Enter your school name: ")
                      # Display the Input Data
                      print ("Name:",name)
                      print ("School Name:", school_name)

                     On running the above program, we get the following output:

                         Output

                      Enter your name: Jaspreet
                      Enter your school name: DPS
                      Name: Jaspreet
                      School Name: DPS

                                                                                                 Introduction to Python  143

| 140 141 142 143 144 145 146 147 148 149 150 |