Learn Python Tutorial - 1 Preliminaries


Python Basics

(Learn Python Programming in 20 Minutes)

 

 


1 Preliminaries

1.1 What is Python?

Python is a powerful modern computer programming language. It bears some similarities to Fortran, one of the earliest programming languages, but it is much more powerful than Fortran. Python allows you to use variables without declaring them (i.e., it determines types implicitly), and it relies on indentation as a control structure. You are not forced to dene classes in Python (unlike Java) but you are free to do so when convenient. 
Python was developed by Guido van Rossum, and it is free software. Free as in “free beer,” in that you can obtain Python without spending any money. But Python is also free in other important ways, for example you are free to copy it as many times as you like, and free to study the source code, and make changes to it. There is a worldwide movement behind the idea of free software, initiated in 1983 by Richard Stallman.
 This document focuses on learning Python for the purpose of doing mathematical calculations. We assume the reader has some knowledge of basic mathematics, but we try not to assume any previous exposure to computer programming, although some such exposure would certainly be helpful. Python is a good choice for mathematical calculations, since we can write code quickly, test it easily, and its syntax is similar to the way mathematical ideas are expressed in the mathematical literature. By learning Python you will also be learning a major tool used by many web developers.

 1.2 Installation and documentation

If you use Mac OS X or Linux, then Python should already be installed on your computer by default. If not, you can download the latest version by visiting the Python home page, at

where you will also nd loads of documentation and other useful information. Windows users can also download Python at this website. Don’t forget this website; it is your rst point of reference for all things Python. You will nd there, for example, reference [1], the excellent Python Tutorial by Guido van Rossum. You may nd it useful to read along in the Tutorial as a supplement to this document.
 


 

 

No comments:

Post a Comment

Your feedback is highly appreciated and will help us to improve our content.