Printing Output

In the last lesson, your program had one print line, and it showed one line of text. To show more lines, write more print lines:

print("Good morning!")
print("Welcome to the class.")
print("Let's begin.")

Output:

Good morning!
Welcome to the class.
Let's begin.

Python runs your code from top to bottom, one line after another. Each print shows its text on a new line. So the output comes out in the same order as the print lines in your code.

The quotes are not printed. They only tell Python where the text starts and ends. Everything between them is printed exactly as you wrote it, including spaces and punctuation like ! and ..

You can also print a number. A number does not need quotes:

print("Your seat number is")
print(14)

Output:

Your seat number is
14

There are two short exercises. In the first, put three lines in the right order. In the second, print a line of text and a number.