The first program that is usually written by a beginning python programmer is a program that writes "hello world" on the screen.
This program is very simple. Type:
print 'hello world'
Then save and run it. It will show "hello world" on the screen.
The print command tells the computer to write whatever is in quotations after the command.
The one rule is that the text you want to print must be in quotes. You can use single or double quotes as long as you end with the same type of quote.
So you can't type, "hello world' or 'hello world".
But 'hello world' and "hello world" will work,
Next Post: Variables
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment