PYTHON_101 | HELLO WORLD
SMARS Learning Platform
26% Complete
PYTHON_101 | HELLO WORLD
Lets create a simple program that will display the message ‘Hello World’1.
First, here is the code, type this into your Python editor:
print ('Hello World!')
When we run this, we will see the following printed to our screen (also refered to as the console):
Hello World!
As you can see this is a very simple piece of code. The word print
is a special word that Python understands. Python expects a line of text between the brackets, inside of the speech marks.
Notice that the print
command is in lowercase; typing Print
or PRINT
will result in an error message.
We call this case sensitive; we need to ensure that the commands we type are in the correct case for Python to work properly.
This is a tradition that many programming language tutorials use to help you understand how to write a simple program. ↩