What is Python and Why you should care
If you are into computers and haven't heard about Python then you're probably living under a rock or haven't had any contact with civilization in a long while. Python is a new and very sexy programming language that is so cool and so powerful its used by NASA and Google and can do a million things in a single page of code.
Most people that like technology and computers like python for several reasons. Python is very concise you can do a lot in a few lines of code. The built in features of the language and library are very extensive and get a lot done.
If you want to pick a programming language to learn for the heck of it or to get things done quickly and without spending the rest of your life in a debugger then Python is the way to go
The Interpreter
Now as you already might know any programming you do is a form of communication between a human being and a machine. Computers only natively understand bits and bytes and memory addresses and stuff you'll learn about when you try to learn Assembler. Unfortunately trying to solve a real-world problem while thinking of bits and bytes and registers and flags doesn't get you very far. Computer scientist invented the idea of programming languages to make the lives of programmers much easier. Now you tell a computer what to do in a certain "Programming Language" and a piece of software (called the interpreter in Python)will do the translating from the human high-level view of things to the bits and bytes and memory address view of things that computers understand on their own without outside intervention.
Where to get Python From
In order for your computer to understand Python programs you'll have to download the python interpreter. The latest of version as of this writing is 3.3.0 . The interpreter is available for Windows,Mac and Linux and comes in a 64-bit and 32-bit versions.
If you're running windows like me, just download the python-3.3.0 Windows Installer (19.1 MB)
and click next a couple of times. The Python 3.3.0 Installer will install to C:\Python33 and add program files folder. This folder should look something like this:
The windows Installer brings you the Python interpreter as well as the documentation that will show you the rules of the language.
So open the IDLE python GUI or the Python command line and start entering little programs and seeing how the work interactively.
Examples of working in the Python GUI
You'll notice a >>> prompt that tells you that Python is waiting for you to enter something so it can work on.
So if you type this :
>>> m = "this is my new life"
>>> len(m)
You'll get this
19
Which is the size of the string called m.
Reading through the Python manuals will give you all the information you need to start programming effectively.
The Python 3.3 manual is divided into the following major sections:
- Tutorial
- Library Reference
- Language Reference
No comments:
Post a Comment