Sinisterly
Python Tutorial 1 - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Python (https://sinister.li/Forum-Python)
+--- Thread: Python Tutorial 1 (/Thread-Python-Tutorial-1)



Python Tutorial 1 - AnonFreeworld - 01-17-2013

Python is a pretty fucking epic language. It's very useful and you'll see alot of good scripts written in it. I'm going to start you off with the usual "Hello World". Open up notepad and type:

Code:
print "Hello world"

Now save it as test.py in the user directory of your user. For example mine is /Users/AnonFW so I would save it there. Now open up command prompt and type test.py and hit enter. It will run your script.

Output:
Code:
Hello world

Describing what the code does:
The code simply prints out Hello world.
Code:
print
print is simply saying print what is inside the qoutes.
As you guessed with common sense what is inside the qoutes will be the output in the command prompt.


RE: Python Tutorial 1 - Atmospheric - 01-18-2013

I've been trying to learn Python with the help of Z teaching me. I remember him teaching me this, like 3 weeks ago.


RE: Python Tutorial 1 - Zealotry - 01-18-2013

(01-18-2013, 02:54 AM)Atmospheric Wrote: I've been trying to learn Python with the help of Z teaching me. I remember him teaching me this, like 3 weeks ago.

We need to pick that back up! XD


RE: Python Tutorial 1 - AnonFreeworld - 01-20-2013

(01-18-2013, 02:54 AM)Atmospheric Wrote: I've been trying to learn Python with the help of Z teaching me. I remember him teaching me this, like 3 weeks ago.

It's one of the best scripting languages besides perl and ruby IMO. Keep trying and I hope to see what you can do.


RE: Python Tutorial 1 - Atmospheric - 01-20-2013

(01-18-2013, 02:58 AM)Zealotry Wrote:
(01-18-2013, 02:54 AM)Atmospheric Wrote: I've been trying to learn Python with the help of Z teaching me. I remember him teaching me this, like 3 weeks ago.

We need to pick that back up! XD

Kenny if you offer to teach me i'll start doing it. I'm slow in the head you should know that, I need a teacher.