How to Write a Basic Hello World Script in Python
In this tutorial, we will say hello to world from our Python command shell.
We will write a very simple Hello World script in Python as a start. If you didn't already install Python, please check this tutorial that will help you with the installation.
1. Our first step is to open Python command shell. There are several ways to open Python command shell and we will demonstrate each of them below:
1.a) On the start menu, type python in the search box and click Python (command line) on the Programs list.
1.b) Go to Python installation path, and double click on python.exe.
1.c) Open command line window by typing cmd in the start menu search box and pressing Enter when cmd.exe is selected.
In the command line, type python and press enter. Note that, if you have not added python installation path to the system Path, you have to write full path of python.exe.
2. Once the Python command shell is open, type
print ("Hello World!")
and press enter. Python command shell will display Hello World! in a new line.