A Typical First ProgramΒΆ

Traditionally, the first program written in a new language is called Hello, World! because all it does is display the words, Hello, World! In Python, the source code looks like this.

print("Hello, World!")

This is an example of using the print function, which doesn’t actually print anything on paper. It displays a value on the screen. In this case, the result is the phrase:

Hello, World!

Here is the example in activecode. Give it a try!




(ch01_2)

The quotation marks in the program mark the beginning and end of the value. They don’t appear in the result.

Next Section - Comments