Python Hello World

Resources

Video Script

Let’s go through the process of writing our first program in Python using Codio.

First, we’ll need to make sure we have the correct file open. For this example, we are using a file named HelloWorld.py. It should already be open in the panel on the left for us. If not, we can always find it in the file tree to the far left.

Then, we can add the code to print “Hello World!” to the screen:

print("Hello World")

This line tells us to use the print method that is built-in to Python, which can print text to the screen. We’ll learn more about methods in a later lesson.

For now, we just need to know that anything inside of the parentheses ( ) will be displayed to the user. Since we want to print out actual text, we also make sure that it is in quotation marks " " so that Python will know that it is meant to be treated as text and not more code.

That’s all it takes! On the next page, we’ll learn how to use the Python interpreter to actually run this program. So, when you are ready, click the “Next” button to move on to the next page.