Intro to Python
AriTelford1 (0)


Python is an easy language to learn with super easy syntax. Here's a basic program
print('Hello world')
This program is pretty self explanatory, but there's one important thing. Notice the single quotes. You can use double quotes or single quotes, but you won't be able to use them again. By that I mean you can't say
print("John said "Hello world" to the man")
because the python interpreter will go to the next quote and end there, thus creating an error. The same goes for single quotes.


Variables are very easy in python. First, write the name of it, then an equals sign, and the value. For example, you could say
variable = 'value'
To print this new variable, just use the print command we learned about
this will output value to the console.

That's all for now. I'll post another tutorial soon.

You are viewing a single comment. View All
malvoliothegood (718)

Or use a mixture of paired single and double quotes e.g.
print("Hello 'Python'")