Lesson ยท 5 min
Print a message
Your first program
A program is a list of instructions that a computer follows, one line at a time. In Python, the print function shows a message on the screen.
print("Good morning!")
The message in quotation marks is a string. A string is a piece of text. You can use double quotes "like this" or single quotes 'like this'.
Python does not need a semicolon at the end of a line. It uses the end of the line instead.
The first time you press Run, Python needs a few seconds to start in your browser. Later runs are fast.
Your turn
Write your code, then press Run. When you think you are done, press Check my work.
Tasks
2 to do
Task 1, not checked yet. Print the text
Hello, world!withprint.Task 2, not checked yet. On the next line, print
I am learning Python.
Task 1 of 2
Print the text Hello, world! with print.