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 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 name HelloWorld in python by opening PyCharm application. See images below for creating a new HelloWorld project.
Click on Create New Project for creating 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 images below for creating a new app.py file.
Step 2. Code to write hello world in python:
After creating 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 string either in single, double, or triple quotes.
Step 3. Run your project to get the output:
Now run your project by clicking Run option from menu bar.
and you see following output in the terminal.
In this article, you learned how to write program hello world in python. If you have problems while implementing code, you can ask me through the comment section.