first program we write in a new language is called “Hello, World!” because
all it does is display the words “Hello, World!”. In Python, it looks like this:
> print('Hello, World!')
This is an example of a print statement, it doesn’t actually print anything on
paper. It displays a result on screen. In this case, the result is words
Hello, World!
In Python 2, the print statement is different; it is not a function, so it doesn’t use
parentheses.
>print 'Hello, World!'
all it does is display the words “Hello, World!”. In Python, it looks like this:
> print('Hello, World!')
This is an example of a print statement, it doesn’t actually print anything on
paper. It displays a result on screen. In this case, the result is words
Hello, World!
In Python 2, the print statement is different; it is not a function, so it doesn’t use
parentheses.
>print 'Hello, World!'
Comments
Post a Comment