Python - 1

Python - 1: Print Your First Message

Welcome to Python! The print() function displays text in the output.

Your challenge: Print a greeting, then add two more messages of your own.

✦ Python Editor
▶ Output

How print() works

Place the message inside parentheses: print("Hello, Python!")

Text goes inside quotation marks so Python knows it is a string.

Each print() statement normally appears on a new line in the output.

Try it: Change the greeting, then add two more print() statements.

Good Python habit: Make sure your opening and closing quotation marks and parentheses match.

👀 Show Example Solution
print("Hello, Python!")
print("My name is Alex.")
print("I am learning Python!")

Each line calls print() once, so three separate messages appear in the output.