---
description: In this tutorial, create your first Hello world program in python using pycharm IDE and command prompt.
title: Hello World: Create your First Python Program
image: https://www.guru99.com/images/your-first-python-program.png
---

 

[Skip to content](#main) 

**⚡ Smart Summary**

Hello World is the traditional first Python program. The steps below show how to create and run it in the PyCharm IDE and from the command line, then explain the print() function and the common errors beginners encounter.

* 🖥️ **Create Project:** Open PyCharm, create a new project, and name it something meaningful.
* 📄 **Add File:** Create a new Python file, for example HelloWorld.py.
* ⌨️ **Write Code:** Type print(“Hello World”) into the editor.
* ▶️ **Run It:** Use the Run menu, and the output appears at the bottom of the screen.
* 💻 **No IDE Needed:** You can also run the file from the command prompt or an online editor.
* ⚠️ **Watch For:** Python is case-sensitive, so use print, not Print.

[ Read More ](javascript:void%280%29;) 

![Create your First Python Program](https://www.guru99.com/images/your-first-python-program.png)

In the last tutorial, we completed our Python installation and setup. It is time to create your first program.

## Creating First Program

**Step 1)** Open the PyCharm Editor. You can see the introductory screen for PyCharm. To create a new project, click on “Create New Project”.

[](https://www.guru99.com/images/Pythonnew/Python3.1.png)

**Step 2)** You will need to select a location.

1. You can select the location where you want the project to be created. If you do not want to change the location, then keep it as it is, but at least change the name from “untitled” to something more meaningful, like “FirstProject”.
2. PyCharm should have found the Python interpreter you installed earlier.
3. Next, click the “Create” Button.

[](https://www.guru99.com/images/Pythonnew/PythonS3.2.png)

**Step 3)** Now go up to the “File” menu and select “New”. Next, select “Python File”.

[](https://www.guru99.com/images/Pythonnew/PythonS3.3.png)

**Step 4)** A new pop-up will appear. Now type the name of the file you want (here we give “HelloWorld”) and hit “OK”.

[](https://www.guru99.com/images/Pythonnew/PythonS3.4.png)

**Step 5)** Now type a simple program – print(‘Hello World!’).

[](https://www.guru99.com/images/Pythonnew/PythonS3.5.png)

### RELATED ARTICLES

* [Python round() Function with EXAMPLES ](https://www.guru99.com/round-function-python.html "Python round() Function with EXAMPLES")
* [Python Queue: FIFO, LIFO Example ](https://www.guru99.com/python-queue-example.html "Python Queue: FIFO, LIFO Example")
* [Python String format() Explain with EXAMPLES ](https://www.guru99.com/python-string-format.html "Python String format() Explain with EXAMPLES")
* [How to reverse a String in Python (5 Methods) ](https://www.guru99.com/reverse-a-string-in-python.html "How to reverse a String in Python (5 Methods)")

**Step 6)** Now go up to the “Run” menu and select “Run” to run your program.

[](https://www.guru99.com/images/Pythonnew/PythonS3.6.png)

**Step 7)** You can see the output of your program at the bottom of the screen.

[](https://www.guru99.com/images/Pythonnew/Python3.5.png)

**Step 8)** Do not worry if you do not have the PyCharm Editor installed, you can still run the code from the command prompt. Enter the correct path of a file in the command prompt to run the program.

[](https://www.guru99.com/images/Pythonnew/Python3.6.png)

The output of the code would be:

[](https://www.guru99.com/images/Pythonnew/Python3.7.png)

**Step 9)** If you are still not able to run the program, we have a Python Editor for you. Please run the given code at the [Python Online Editor](https://www.guru99.com/execute-python-online.html).

print("Hello World")  

This code is editable. Click Run to Execute   

  
## Understanding the Hello World Program

The Hello World program is only one line, but it introduces the most important building block in Python: the **print()** function. The print() function displays whatever you place inside its parentheses on the screen.

In the example below, the text **“Hello World”** is a string. A string is a sequence of characters wrapped in single or double quotes. Python treats **‘Hello World’** and **“Hello World”** the same way, so you can use either style.

message = "Hello World"
print(message)

A few points make Python beginner-friendly. You do not need to declare a data type for the variable, there is no semicolon at the end of the line, and the program runs immediately without a separate compile step. Python is also case-sensitive, so **print** must be written in lowercase.

## Common Errors When Writing Your First Python Program

Beginners often hit a few small errors when running their first program. Here are the most common ones and how to fix them:

* **NameError / capitalization:** Writing **Print** instead of **print**. Python is case-sensitive, so the function name must be lowercase.
* **SyntaxError:** Forgetting a parenthesis or a closing quote, such as **print(“Hello World)**. Always match your brackets and quotes.
* **Smart quotes:** Copying code with curly quotes (“”) instead of straight quotes (“”). Retype the quotes inside a code editor.
* **IndentationError:** Adding an unexpected space or tab before print. The first line of code should start at the very left.
* **File not found:** Running the wrong path in the command prompt. Save the file first and use its exact location.

## FAQs

🛠️ Do I need to compile a Python program before running it?

No. Python is an interpreted language, so you do not compile it separately. When you run the file, the Python interpreter reads and executes the code line by line, which is why your Hello World program runs instantly.

🔤 Why does Python show an error for “Print” instead of “print”?

Python is case-sensitive. The built-in function is named print in all lowercase, so writing Print or PRINT is treated as an unknown name and raises a NameError. Always type print exactly in lowercase.

🌐 Can I run Python code without installing anything?

Yes. Online Python editors let you write and run code directly in a browser without any installation. They are great for quick practice, though installing Python locally is better for building and saving real projects.

🤖 Can AI write my first Python program for me?

Yes. AI assistants can generate a Hello World program and explain each line. However, typing and running it yourself helps you learn faster, so use AI to check your work and clarify errors rather than only copying output.

🧠 How can AI help a beginner learn Python?

AI can explain concepts in simple terms, suggest practice exercises, and debug your errors with plain-language hints. Used alongside hands-on coding, it acts like a patient tutor that answers questions instantly and keeps beginners motivated.

#### Summarize this post with:

ChatGPT Perplexity Grok Google AI 

**Stay Updated on AI** **Get Weekly AI Skills, Trends, Actionable Advice.** 

##### Sign up for the newsletter

Subscribe for Free 

You have successfully subscribed.  
Please check your inbox. 

![AI-Newsletter]() Chosen by over **350,000+** professionals 

[Scroll to top ](#wrapper)Scroll to top 

× 

Toggle Menu Close 

Search for: 

Search

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.guru99.com/#organization","name":"Guru99","sameAs":["https://www.facebook.com/Guru99Official","https://twitter.com/guru99com"],"logo":{"@type":"ImageObject","@id":"https://www.guru99.com/#logo","url":"https://www.guru99.com/images/guru99-logo-v1-150x59.png","contentUrl":"https://www.guru99.com/images/guru99-logo-v1-150x59.png","caption":"Guru99","inLanguage":"en-US"}},{"@type":"WebSite","@id":"https://www.guru99.com/#website","url":"https://www.guru99.com","name":"Guru99","publisher":{"@id":"https://www.guru99.com/#organization"},"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https://www.guru99.com/images/your-first-python-program.png","url":"https://www.guru99.com/images/your-first-python-program.png","width":"700","height":"250","caption":"Your First Python Program","inLanguage":"en-US"},{"@type":"BreadcrumbList","@id":"https://www.guru99.com/creating-your-first-python-program.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":"1","item":{"@id":"https://www.guru99.com","name":"Home"}},{"@type":"ListItem","position":"2","item":{"@id":"https://www.guru99.com/python","name":"Python"}},{"@type":"ListItem","position":"3","item":{"@id":"https://www.guru99.com/creating-your-first-python-program.html","name":"Hello World: Create your First Python Program"}}]},{"@type":"WebPage","@id":"https://www.guru99.com/creating-your-first-python-program.html#webpage","url":"https://www.guru99.com/creating-your-first-python-program.html","name":"Hello World: Create your First Python Program","dateModified":"2026-07-10T11:54:23+05:30","isPartOf":{"@id":"https://www.guru99.com/#website"},"primaryImageOfPage":{"@id":"https://www.guru99.com/images/your-first-python-program.png"},"inLanguage":"en-US","breadcrumb":{"@id":"https://www.guru99.com/creating-your-first-python-program.html#breadcrumb"}},{"@type":"Person","@id":"https://www.guru99.com/author/logan","name":"Logan Young","description":"I'm Logan Young, an expert in Python, providing top-tier tutorials and guides to enhance your coding skills and streamline your learning journey.","url":"https://www.guru99.com/author/logan","image":{"@type":"ImageObject","@id":"https://www.guru99.com/images/logan-young-author.png","url":"https://www.guru99.com/images/logan-young-author.png","caption":"Logan Young","inLanguage":"en-US"},"worksFor":{"@id":"https://www.guru99.com/#organization"}},{"articleSection":"Python","headline":"Hello World: Create your First Python Program","description":"In this tutorial, create your first Hello world program in python using pycharm IDE and command prompt.","keywords":"python","speakable":{"@type":"SpeakableSpecification","cssSelector":[".entry-title",".summary"]},"@type":"Article","author":{"@id":"https://www.guru99.com/author/logan","name":"Logan Young"},"dateModified":"2026-07-10T11:54:23+05:30","image":{"@id":"https://www.guru99.com/images/your-first-python-program.png"},"copyrightYear":"2026","name":"Hello World: Create your First Python Program","subjectOf":[{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"Do I need to compile a Python program before running it?","acceptedAnswer":{"@type":"Answer","text":"No. Python is an interpreted language, so you do not compile it separately. When you run the file, the Python interpreter reads and executes the code line by line, which is why your Hello World program runs instantly."}},{"@type":"Question","name":"Why does Python show an error for \"Print\" instead of \"print\"?","acceptedAnswer":{"@type":"Answer","text":"Python is case-sensitive. The built-in function is named print in all lowercase, so writing Print or PRINT is treated as an unknown name and raises a NameError. Always type print exactly in lowercase."}},{"@type":"Question","name":"Can I run Python code without installing anything?","acceptedAnswer":{"@type":"Answer","text":"Yes. Online Python editors let you write and run code directly in a browser without any installation. They are great for quick practice, though installing Python locally is better for building and saving real projects."}},{"@type":"Question","name":"Can AI write my first Python program for me?","acceptedAnswer":{"@type":"Answer","text":"Yes. AI assistants can generate a Hello World program and explain each line. However, typing and running it yourself helps you learn faster, so use AI to check your work and clarify errors rather than only copying output."}},{"@type":"Question","name":"How can AI help a beginner learn Python?","acceptedAnswer":{"@type":"Answer","text":"AI can explain concepts in simple terms, suggest practice exercises, and debug your errors with plain-language hints. Used alongside hands-on coding, it acts like a patient tutor that answers questions instantly and keeps beginners motivated."}}]}],"@id":"https://www.guru99.com/creating-your-first-python-program.html#schema-1139136","isPartOf":{"@id":"https://www.guru99.com/creating-your-first-python-program.html#webpage"},"publisher":{"@id":"https://www.guru99.com/#organization"},"inLanguage":"en-US","mainEntityOfPage":{"@id":"https://www.guru99.com/creating-your-first-python-program.html#webpage"}}]}
```
