Tag Archive
arctic arctic monkeys bot clever cure def f# f-sharp framework fsharp functions guitar guitar tabs infection install intelligent irc irc bot ircbot Linux lyrics malware monkeys network notes oop pcquad php Python quotes sheets simple social social network socialnetwork song source code string tabs too much to ask tutorial ubuntu variables without tools zend
Python Tutorial Beginner
Chapter 1
Hello welcome to my Python tutorial , first of all , python is a programming language , you can use it as OOP , but you cant compile the programs you made though , the onc thing you can do is pack it with a python packer to make it executable on computers without python , but the file size will be increased on about 7 mb !
First download http://www.python.org/download/ For Linux or Windows what ever…
Chapter 2 Strings
Let us begin start the python IDLE and write in
print “hello world”
wow your first hello world script is done
if you compare python to php it has a similiar syntax but you dont need a semicolon (;) on the end of each function in python
by the way strings always have to be covered by quotes or t_strings (‘)
Chapter 3 Variables
Maybe you know variables from your math lessons in school . Variables can be a wildcard for something for example a mathematical function
y=x+1 y would ahve the value x+1 simple isnt it? ![]()
lets go to our IDLE and type in.
test=”hello world”
print test
you will see “hello world”
Chapter 4 Functions
Now we make a huge jump and go to functions .
functions can contain already-programmed procedures, you need it for object oriented programming.
create a simple function:
now open your IDLE and press new on the navigation
type in
def test(string)
return string
it will be formatted automatically .press enter and type
print test(“Hello World”)
press save as and run it.
you will see Hello World…
def shortens “define” and defines the name of the function with what you want to call it in the brackets you actually dont need to put in a variable but if so you canc all it what you want.
Today you learned to set up Python
program with variables and strings and to program functions.
Also you should take a look at some Youtube Videos