Python Hello World Program (using Pycharm)

By: On:

In this python tutorial, we will build our first traditional Python Hello world program. I have installed python version 3.8.2 and Pycharm version 2020.1 as the code editor which we will use to build the first program.

So in my last blog we discussed how can we install python3 in different operating system and we saw the installation of different code editors and IDEs used to write the python code.

If you didn’t go through that you can see once Python download and Installation steps (Windows 10/Unix/Mac/Ubuntu/CentOS ).

Python Hello World program using python 3.8 and Pycharm 2020

Now our python is installed and code editor (Pycharm) is also installed in my machine. Both are with the latest version as of April 2020. Let’s start our first program.


Open the Pycharm code editor

Python Program to Print Hello World
Python Hello World program


Now next is click on “Create New Project” button.

Python3 Program to Print Hello World


Now in this step first give a meaning full name to the project. I gave the name as “Helloworld”. You can change your preferred location also. Base Interpreter will be populated automatically. Now please click on the create button.

How do you write a first program in Python?


Now the below popup will appear, you can just close the tip of the day pop up.

Say "HelloWorld!" With Python


Now the below popup shows some helpful information. See once. One more important thing among these is you can drag and drop a file there so that it will open.

Hello, World!


In this step Click on File –> New Scratch file.

Hello World: Create your First Python Program


Now choose “Python” from the New scratch file pop up.

Create a hello world program using Pycharm


Now see below one python file with name got created.

Python script to print Hello World on screen


Now give a meaning full name to the file. So we need to rename this file. Right-click on the and select the Rename file.

Python3 script to print Hello World on screen


Below Rename pop up will appear, Give a Proper name. In this case I gave the name as Then click on the Refactor button.

How to create a hello world program using python 3.8 version


Now, see the file name has been renamed to “”. So now our empty python file is ready.

How to create a python hello world program


Now write the below code in the file and then Click on run –> Run option. You can also use keyboard shortcut Alt+Shift+F10 to run the file.

Print("Hello world!!")
print('Hello World')


Oops, While executing the above code,It throws me the below error

Traceback (most recent call last):
  File "C:/Users/Bijay/AppData/Roaming/JetBrains/PyCharmCE2020.1/scratches/", line 1, in <module>
    Print('Hello world!!')
NameError: name 'Print' is not defined

Any guess why the above error. This is because We entered the print as Print(caps P). The correct one should be print().

Note: Python is case sensitive.

So the correct line of code is as below.

print(Hello world!!)

Now enter the above code and run the file. Let’s see what’s happening. Now if you will notice here the run option is Run”HelloWorld” that means Run””Filename.

Now when I changed the Print(caps P) to print(). If you will see below the auto-suggestion box showing print function displayed.

print('Hello World')

Now let’s run the program.

Create a hello world Program using python 3.8 and Pycharm 2020.1.


Congratulations, Yes I got the expected output with out any error this time. See below.

How To Write Your First Python 3 Program

Run your Python file from the command prompt

There is one more approach to run your python file form your command prompt if you don’t have Pycharm installed in your machine.


Open your command prompt and go to the path where your python file is present. To do so use the below command and press enter.

cd C:\Users\Bijay\AppData\Roaming\JetBrains\PyCharmCE2020.1\scratches

Note: C:\Users\Bijay\AppData\Roaming\JetBrains\PyCharmCE2020.1\scratches is the path for me where my file presents. So I need to go to that path and execute the code.


Now put file name i.e and press enter. See below we got the expected output.

Create hello world file using pycharm 2020

You may like following below Python Tutorials:


Here in this tutorial, We have completed developing our first hello world program using python version 3.8 and Pycharm version 2020.1 as a code editor.

Python is the best!!!!!

This python tutorial explains the below points:

  • How to create a Python Hello World program using python 3.8 with Pycharm 2020 code editor?
  • Run your Python file from the command prompt.

Leave a Comment