Newest Visitor Badge Earned!
Click to create an account and start competing today!
After Hours Programming
Show Tutorials


You (Level 0)
0/25
Last Badge Earned
Newest Visitor

Python Introduction Tutorial

Python Introduction

The Python Introduction tutorial explains how and where to start writing Python for the server side.

First, off Python usually requires some setup by downloading the Python IDLE. The Python IDLE is basically a text editor that lets you execute Python code. If you want to use Python as a server-side language, you certainly can. Python can output HTML just like other languages can, but Python is more commonly used as a module rather than intertwined like some PHP or ColdFusion. As for right now, I recommend you download the IDLE to help you debug your code while we learn the fundamentals offline. One really quick note, we are using python 3.2. Before we go to an example, please understand that Python is space sensitive. This means you must have 4 spaces for each indentation every single time. We'll get into this more later, now let's go to an example.

Example print ("My first Python code!")
print ("easier than I expected")
Result My first Python Code!
easier than I expected

You can see right off the bat, that we use print() a whole lot. Basically, all it does is output whatever is inside the parentheses. You will be doing lots of printing so, you can get more comfortable with it as we go. Print is a function that we will go into later, but just understand that it can take a value. On the first line, we provide a string value "My first Python code!", which is a string because of the quotes. So, you just told Python to output that string to the console. Python completes that task and moves onto the next line where it prints out a different string.

See how simple that was? Well, get used to it. Python is probably one of the simplest looking languages that can do some of the most powerful things you can imagine. You can see from the example how clean Python's syntax is without all of the extra stuff that other languages add. That covers the easiest Python statement you will ever write. In the following sections, we will be using more advanced functions and teaching you the fundamentals of Python.

Try testing your code with the code simulator!

Let's move on to some more tutorials or the next section!



Previous Tutorial

Overview

Next Tutorial

Comments







If you enjoyed this resource, support me by sharing this page with others.

Stumbleupon Facebook Twitter GooglePlus Reddit Delicious Digg


Comment or Suggestion?

Comments are a way to tell me about corrections or suggestions, what you thought about the resource, or providing additional information. Help feed the discussion!


Yes




Comments on Python Introduction

user
David K Hill
100
September 1, 2014 02:22AM
The Python IDLE link is broken:  404 Error.
http://www.python.org/getit/


user
henry
August 26, 2014 10:01PM
Sorry I forgot to add I hooked up a thermomiter and I want to pi to recive the temp and send it to my computer screen along with the live streaming video.   Ps I'm running python


user
henry
August 26, 2014 09:57PM
Hi I'm brand new to programing and I need some help I justbought.  A rasberry pi a RC car and I want to insert the pi into the car PS I kow how to hook it up but idk how to get it to recive the tempeture and send it to the camera I hooked up to the car it is streaming everything the car is in front of I want to see the temp on the screen. Thanks.      


user
Lonnie Laver
August 25, 2014 06:45AM
</br><a href="http://www.individualdirectory.com
">Lonnie Laver</a></br>[url=http://www.individualdirectory.com
]Lonnie Laver[/url]


user
yusuff
August 23, 2014 08:18PM
this program is great remind me of data processing i took in hs back in 1988


user
Miriam
100
August 19, 2014 08:32PM
I came back after a few days of trying the tutorials, and now I can't find the spot where I left off, I want to advance to the next tutorial but the button is gone


user
ilianna
August 19, 2014 04:47PM
i love this its super rad im pumped to get in to it 


user
mrobbins
25
August 18, 2014 08:25PM
Idle download is "not found".


user
James lee
August 15, 2014 06:14AM
It is ok.                                                                                                                                                           


user
CodeLikeJesus
75
August 13, 2014 08:23AM
This was great man


user
Skully
150
August 12, 2014 01:37PM
Very nice !


user
chandima
August 11, 2014 12:50AM
good nice to beggin a programming language


user
john smith
100
August 8, 2014 01:04AM
this is enjoyable                                              


user
Katie
August 6, 2014 02:10PM
This is fun!


user
Michal
75
August 5, 2014 11:42AM
Do I have to comment each time?


user
J12345
August 4, 2014 12:11AM
Do I have to comment each time?


user
buttu
July 31, 2014 02:28PM
thanks a lot got the beginner tutorial 


user
Valter
July 31, 2014 05:28AM
ok, fine, let's get going.


user
jamil
July 27, 2014 02:45PM
I used to develop software and  I used Java language and I learn C# as well and I like to learn new programming languages, I think Python will be a good choice and It will be fun for me.


user
DamianDasan
125
July 25, 2014 05:48AM
This is easy.


user
lcsszz
July 23, 2014 05:07AM
Add more examples and vedios about this language 


user
Renato
50
July 22, 2014 07:24AM
http://www.python.org/getit/ don't work.


user
joel kone
July 9, 2014 12:31PM
yayyyyyyyyyyyyyyyyyyyyyyyyy i like a lot so far


user
pymp daddio
July 3, 2014 02:30AM
Peeeeennnniiiisss pppppppeeeeeennnnniiiiusssss


user
Mario Bor
July 2, 2014 01:51PM
so far so good for a newbie like me . 


user
CS Cheong
June 29, 2014 09:50AM
I have not been doing programming since the Basic days.  Python provides me free access to programming again.  Thanks.


user
abdullah anisetty
75
June 29, 2014 09:07AM
print("best website to learn computer language")
print("*_#")


user
Clau Lacatus
125
June 28, 2014 01:53AM
Yeahoo!! The greatest teaching website for a newbie (like me)! :) Thanks to owner & colaborators!


user
edward
June 20, 2014 01:35AM
I Amm a geniuuss.,(Excus my splling and gramar


user
Alina
125
June 17, 2014 06:48PM
So far, so good.