Introduction to Python
Why, How, Why not, etc.
➲ Workshop : Selasa, 23 Feb 2016, Ged. F UNAND, oleh : Ahmad Junaidi,
MT, MEngSc
Computers and Programming
➲ Turing provided an influential
formalization of the concept of the algorithm and
computation with the Turing
machine. Alan Turing,
(1912–1954)
"It is possible to invent a single machine which
can be used to compute any computable
Computer Programming
➲ 1940s:
Assembly language
The first programming language: Plankalkül
➲ 1950s, 60s:
FORTRAN, LISP, COBOL, BASIC
➲ 1970s:
Object orientation (e.g. Simula, Smalltalk) C
➲ 1980s:
C++, Ada, Perl
➲ 1980s: (Internet)
Java Python C#
Programming Languages
➲ Java: is a cargo ship. It’s
very bulky. It’s very
enterprise~y. It can also carry a lot of weight. Will
carry a project, but not very fun to drive.
➲ PHP: is a bamboo raft. A
series of hacks held together by string. Still keeps afloat
➲ C/C++: is a nuclear submarine. The
instructions are in 'Japanese', but all of the hardware is optimized for performance.
Clumsy, in many aspects can be
dangerous, but it regularly goes where other boats go when they have holes!
Languages
➲ Python: Small boat with outboard engine. Easy
to learn, fun to ride, no need to have a license, very Dutch. Kids love it! Many use it as a hobby.
Born 31 January 1956 (age 60)Haarlem, Netherlands
Nationality Dutch
Alma mater University of Amsterdam
Occupation Computer programmer, author
Employer Dropbox
Known for Creating the Python programming language
Awards Award for the Advancement of Free Software (2001)
Guido van Rossum
Monty Python's Flying Circus
Creator Python
He was employed by Google from 2005 until 7 December 2012
Python, a general purpose
programming language. It is
interpreted and dynamically
typed and is very suited for
interactive work and quick
prototyping,
while
being
Position Programming
Language Share Trend
1 Java 24.2 % +0.3 %
© Pierre Carbonnelle, 2015
Worldwide, Feb 2016 compared to a year ago:
Position Programming Language Ratings 21 SAS 0.984% 22 COBOL 0.852% 23 Scratch 0.794% 24 ABAP 0.675% 25 Fortran 0.668% 26 Lisp 0.658% 27 Scheme 0.648% 28 Dart 0.622% 29 Transact-SQL 0.621% 30 Scala 0.532% 31 Ada 0.529% 32 Lua 0.523% 33 Logo 0.431% 34 RPG (OS/400) 0.392% 35 Prolog 0.374% 36 F# 0.348% 37 OpenEdge ABL 0.320% 38 Go 0.294% 39 LabVIEW 0.289% 40 Haskell 0.267% 41 Bash 0.237% 42 Erlang 0.231% 43 Ladder Logic 0.216% 44 PureBasic 0.211% 45 Alice 0.202% 46 (Visual) FoxPro 0.202% 47 Apex 0.199% 48 Rust 0.195% 49 VBScript 0.186% 50 ML 0.172%
Python is now the most popular introductory teaching language at Top U.S. Universities; MIT, Stanford
Why Python
-Readable code (If you understand English, you already
understand Python)
-Easy to learn
-If you know Python, you can work with almost any
Python with little effort
-High-performance computing -Powerful
-Python is broad -Python is fast -Python is free
-Python is efficient
You are looking for a job, which language should you learn?
How to go abut learning...
➲ First
Ignore the details and focus on important principals! Writing small programs is better than reading long
ones!
Find a few good on-line references and use them often.
➲ Then
Take a fairly involved problem and write your own program.
➲ Later
If you are to write fairly long programs, details are also important. Try to remember how, if not why.
Warnings do Matter
(not only errors)
➲ A man is smoking a cigarette and blowing
smoke rings into the air. His girlfriend becomes irritated with the smoke and says, "Can't you
see the warning on the cigarette pack? Smoking is hazardous to your health!"
➲ To which the man replies, "I am a programmer.
https://www.python. org/
Tutorial
https://docs.python.org/2/tutorial/https://docs.python.or g/2/tutorial/
Numpy
Science python
Matplotlib
http://matplotlib.org/
Basemap demo
Integrated Development Environtment (IDE)
Tex Editor
free ide for python
windows
Installing Numpy, Scipy and
Matplotlib with pip install
pip install numpy
pip install Scipy
pip install matplotlib
Install module/package
pip install <name module/package>
make sure you are connected to the Internet