Python Tutorial 1.st tutorial 08-22-2011, 03:44 PM
#1
Helloo HACKCOMMUNITY <3
Im back, and i wont to post this good tutorial !
This is first tutorial soon i will post more !
here you will know some basic stuffs about Python..
Now lets start !
First download Python from here : Python Download
HERE IS Some basic commands :
When you install it open your notepad if you have notepad++ open it it is better !
type in notepad
print "This is my first programe"
Save this as: something.py
Now lets see what this is for..
This is command which shows you a text berween " " .
Lets type our first programe and see how its works:
This is our first programe and i hope that you see what this do..
This is calculator only for adding, now we will type a calculator for basic math operations...
This is basic calculator in other tutorials i will show you how to use loops. If, Else, Elif, While
Im back, and i wont to post this good tutorial !

This is first tutorial soon i will post more !

here you will know some basic stuffs about Python..
Now lets start !

First download Python from here : Python Download
HERE IS Some basic commands :
Quote:print shows text between " " on the screenThis is for this tutorial
input - with this command you can type only number
raw_input withs this comand you can type words but no numbers
# this is for coments
When you install it open your notepad if you have notepad++ open it it is better !

type in notepad
print "This is my first programe"
Save this as: something.py
Now lets see what this is for..
This is command which shows you a text berween " " .
Lets type our first programe and see how its works:
Quote:print "Calculator" # Shows calculator on the screen
a = input ("Type some number here =") # Show msg "Type some number here ="
b = input ("Type another number here =") # Show secong msg..
c = a + b # This will add number that we type in string a and nuber from string b and the result will bre C .
print c # This shows c result on the screen...
This is our first programe and i hope that you see what this do..
This is calculator only for adding, now we will type a calculator for basic math operations...
Quote:print "Calculator" #Show msg Calculator
a=input ("Type some number here =")
b=input ("Type second number =")
c = a + b #c is result for addition a and b
d = a - b #this will substract a and v
e = a / b #this is division a and b
f = a * b #this is multiplication for a and b
print "Addition = ", c #Show msg for addition which we call c!
print "Substract = ", d # Show msg for substract,we call it d !
print "Divison = ", e #Show msg for Div, we call it e !
print "Multiplication = ", f #Show msg for multiplication, we call it f ...
This is basic calculator in other tutorials i will show you how to use loops. If, Else, Elif, While
![[Image: 1308031172619.gif?w=356&h=140]](http://thechive.files.wordpress.com/2011/06/1308031172619.gif?w=356&h=140)
Don't learn to hack, hack to learn.
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)
![[Image: Wfxdx.png]](http://i.imgur.com/Wfxdx.png)
