Code Pumpkin

Hello world in Pycharm

October 1, 2018
Posted by Dipen Adroja

In the previous tutorial, we have installed python and pycharm. In this tutorial, we are going to create our first program in python language. I will be using my Mac during this tutorials. The same steps can be followed with minor tweaks if you are using other OS. We will create first `Hello World` program in PyCharm IDE.

First “Hello world” Program:

  1. Open Pycharm and click on “Create New Project”

Pyacharm Create new project

  1. Provide the location where you want to create the project. Pycharm will find the python interpreter you have installed earlier.

    PyCharm Create Projects

  2.  Right click on project name => New => Python File

    Give name “hello_world” and click OK
     

    Create Python File | Hello word in Pycharm

  3. Write simple program -> print(“Hello World!!!”)

    Hello World!! | Pycharm

  4. Go to Run=> Run and then select the file name

    Run Python File | Hello word in Pycharm

  5. Check the output into the run console. We can see the output “Hello World!!!”

    Hello World Output | Pycharm

Now, what if you don’t have pycharm sad. We can still run python from the terminal as well.

Go to the directory where the python file is located. Then run 


Python hello_world.py

It will produce the output as below laugh
 

Terminal hello world

Apart from this, you can also use python in interactive mode as below:

Interactive Hello World

Congratulations!!!! 

You have successfully ran your first python program.

That's all for this topic. If you guys have any suggestions or queries, feel free to drop a comment. We would be happy to add that in our post. You can also contribute your articles by creating contributor account here.

Happy Learning 🙂



About the Author


Dipen Adroja
Coder, Blogger, Wanderer, Philosopher, Curious pumpkin



Tags: ,


Comments and Queries

If you want someone to read your code, please put the code inside <pre><code> and </code></pre> tags. For example:
<pre><code class="java"> 
String foo = "bar";
</code></pre>
For more information on supported HTML tags in disqus comment, click here.
Total Posts : 122
follow us in feedly
Contribute Your Articles

Subscribe Us

Like Us On Facebook