In this article, you will learn how to write hello world in python. We will use the PyCharm editor for writing this program. PyCharm is a very powerful editor for the python programming language. You can use it for free by using the community edition of PyCharm. If you don’t have PyCharm installed, you can learn how to install python and PyCharm in windows using the following article:
How to install Python and PyCharm IDE on Windows
Follow the steps given below to write hello world in python:
Step 1. Creating a new project:
Create a new project by the name HelloWorld in python by opening the PyCharm application. See the images below for creating a new HelloWorld project.
Click on Create New Project for creating a new project.
Now enter HelloWorld as the project name and then click on Create button.
Create a new file named app.py into the project. See the images below for creating a new app.py file.
Step 2. Code to write hello world in python:
After creating the app.py file, write the following code into the editor.
We have used print() built-in function here which prints the result inside it. We have passed the “Hello World.” string inside it which will print the output in the editor terminal.
You can write strings either in single, double, or triple quotes.
Step 3. Run your project to get the output:
Now run your project by clicking the Run option from the menu bar.
and you see the following output in the terminal.
In this article, you learned how to write the program hello world in python. If you have problems while implementing code, you can ask me through the comment section.