Previous Lesson Table of Contents Next Lesson

One of the most useful things to learn first is print statements. These are statements that you can output from your code that can be used to inform you (or another user of your code) what your code is doing.

To generate print statements in Python, you can write something like this:

print("Hello World!")

This will output:

Hello World!

Pretty intuitive, right? :) Believe it or not, print statements are not always as simple as this in other programming languages. In this example, I printed out what is called a string, or a sequence of characters surrounded with quotation marks. You can print nearly anything in Python, for example, numbers:

print(2)

This will output:

2

Now create some print statements of your own, for example:

  1. Print your name (solution)

  2. Print the number five (solution)

When you’re ready, click here to go to Lesson 2!