Print Text

You have already learned that you can use the print() function to display text or output values:

Pyton Exercise

Print Without a New Line

By default, the print() function ends with a new line.
Pyton Exercise

If you want to print multiple words on the same line, you can use the end parameter:

Pyton Exercise

Python Output Numbers

You can also use the print() function to display numbers:
However, unlike text, we don’t put numbers inside double quotes:

Pyton Exercise

Mix Text and Numbers

You can combine text and numbers in one output by separating them with a comma:

Pyton Exercise

Python Comments

Comments can be used to explain Python code.
Comments can be used to make the code more readable.
Comments can be used to prevent execution when testing code.

Creating a Comment

Comments starts with a #, and Python will ignore them:

Pyton Exercise