In this article, I am going to show you how to write your first program in the PyCharm community edition. PyCharm is the IDE I am using to write my Python program since 2019 and it is a fantastic IDE to write a python program.
The first step you all need to do is to download PyCharm through this link, remember if you wish to get a free version then always pick the community edition. You can always buy a professional version later if you like the free one but you want to get a better version with lots of other features in it. Once you have downloaded the IDE just installed it on your pc.
The second step is to download the latest Python package through this link… Once you have downloaded the module just installed it on your laptop. The python installer is getting very smart now, you do not need to do anything, just follow the instruction on the screen and a new Python package will get installed on your laptop within minutes.
The next step is to check whether the python has been installed correctly on Windows, open the command prompt and type in python –version, and press the enter key! You will see the new python version if the installation is successful.
The next thing is to add the Python module as the python interpreter of the IDE, goto Run->Edit Configurations, under python interpreter select the latest python version you have installed on your laptop, and press the OK button.
Now it is time to create a project folder for all the files you want to put inside it, goto File->New Project and then create a new folder there!
Finally, it is time to test run a python file, there is already a main.py file ready for you in the new project folder so all you need to do is just to change a few lines of codes and see the result!
Change the code as follow and then press Run->’main’
def print_hi(name): # Use a breakpoint in the code line below to debug your script. print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint. # Press the green button in the gutter to run the script. if __name__ == '__main__': print_hi('Hello My World!')Pycharm hello world
That is it! It seems like the PyCharm team is working hard to improve their product, now there are no more installation problems and other issues, keep up the good job!