Python Programming Language
Python Hello World Program
By Mark Ciotola
First published on October 10, 2019. Last updated on February 6, 2021.
Hello World Program
If you have Python, you can try a Hello World program. Examine a simple Python program called HelloWorld.py
print 'Hello World!'
This is a simple program. There are no special structures, so no indentation spaces are required. The file name should end in .py
Create your program in a text editor and name it: HelloWorld.py
To run the program. type into your terminal:
The output should be:
Congratulations! If you can create this program and run it, you are now a Python programmer!
- Modify the program by writing additional print statements with your own messages. Can you make it work?
- Ask yourself, how is a computer program different from a web page? (Keep this question in mind as you learn more.)
« Getting Started With Python | COURSE | A Simple Math Program in Python »