Create a Program in Python Using IDLE:
(1) In the previous blog we will discuss how to install PyCharm for Python and create a program in it. PyCharm is the code editor for Python. In this blog, we can learn how to create a program in Python’s own code editor.
(2) For this go to the windows search bar and type “IDLE” which is Python’s own code editor and Open it as shown below.


(3) Now we can write a simple program in IDLE. After writing the program in IDLE, you simply have to press the enter key on your keyboard and your output will be displayed below the program as shown below.

Create a Program in Python Using Notepad:
(1) Now we will learn how to create a program in python using notepad and how to run it. For this, we have created a new folder on the desktop and created a new file in it using the extension “.py“.


Note: If your computer does not recognize the “.py” extension, then do the following settings on your computer system as shown below.
- Search File Explorer Options on the Windows search bar.

- Go to the View tab and untick the “Hide extensions for known file types” and then click on Apply button as shown below.

- Now your computer recognizes the “.py” extension.
(2) Now right-click on the “FirstProgram.py” file and open it with Notepad as shown below.

(3) Write code in it and save the file as shown below.


(4) Now we have to run the code. For this open the command prompt and go to the directory where you have created the folder as shown below.


The above image shows the location of the Python Project Folder which is created on the desktop. We have to enter this folder by using the command prompt. So we use the cd command so that we can enter the specified path where the folder is created. When we enter the Python Project Folder using the cd command then we use the python command to run the program as shown below.

Comments (No)