370 likes | 381 Views
Introduction to Python. Why, How, Why not, etc. Ahmad Junaidi. There are 241 list of programming languages in the world. How to pick your first Programming Language. Workshop : Selasa, 23 Feb 2016, Ged. F UNAND, oleh : Ahmad Junaidi, MT, MEngSc. Computers and Programming.
E N D
Introduction to Python Why, How, Why not, etc. Ahmad Junaidi
How to pick your first Programming Language • 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 sequence. "
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# • PHP
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 though.
Languages • 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. Even if you don't know what you are doing, can't cause much damage
Creator Python Monty Python's Flying Circus broadcast by the BBC from 1969 to 1974 Guido van Rossum 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 powerful enough to write large applications in Numpy, Scipy, Matplotlib etc.
Worldwide, Feb 2016 compared to a year ago: http://pypl.github.io/PYPL.html
Python is now the most popular introductory teaching language at Top U.S. Universities; MIT, Stanford University, University of California, University of IIIinois, Etc
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? I think the right answer is Python
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. • Reading other people's well written code can help a lot.
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. We don't worry about warnings; we only worry about errors."
python https://www.python.org/ Tutorial https://docs.python.org/2/tutorial/https://docs.python.org/2/tutorial/
python version 2. and 3.
Numerical Python Numpy
Science python Scipy
Graph for Python Matplotlib http://matplotlib.org/
Matplotlib http://matplotlib.org/1.5.1/examples/index.html Basemap demo
Integrated Development Environtment (IDE) Tex Editor free ide for python windows PyScripter
installing process Installing Numpy, Scipy and Matplotlib with pip install
installing process pip install numpy pip install Scipy pip install matplotlib make sure you are connected to the Internet Install module/package pip install <name module/package>