• Tidak ada hasil yang ditemukan

8. Pengenalan Python Programming Language Workshop HMTS 23022016

N/A
N/A
Protected

Academic year: 2017

Membagikan "8. Pengenalan Python Programming Language Workshop HMTS 23022016"

Copied!
37
0
0

Teks penuh

(1)
(2)

Introduction to Python

Why, How, Why not, etc.

(3)
(4)

Workshop : Selasa, 23 Feb 2016, Ged. F UNAND, oleh : Ahmad Junaidi,

MT, MEngSc

(5)

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

(6)

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#

(7)

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

(8)

➲ 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!

(9)

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.

(10)

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

(11)

Python, a general purpose

programming language. It is

interpreted and dynamically

typed and is very suited for

interactive work and quick

prototyping,

while

being

(12)

Position Programming

Language Share Trend

1 Java 24.2 % +0.3 %

© Pierre Carbonnelle, 2015

Worldwide, Feb 2016 compared to a year ago:

(13)

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%

(14)

Python is now the most popular introductory teaching language at Top U.S. Universities; MIT, Stanford

(15)

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?

(16)

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.

(17)
(18)

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.

(19)

https://www.python. org/

Tutorial

https://docs.python.org/2/tutorial/https://docs.python.or g/2/tutorial/

(20)
(21)

Numpy

(22)

Science python

(23)

Matplotlib

http://matplotlib.org/

(24)

Basemap demo

(25)

Integrated Development Environtment (IDE)

Tex Editor

free ide for python

windows

(26)
(27)
(28)
(29)
(30)
(31)
(32)
(33)
(34)
(35)

Installing Numpy, Scipy and

Matplotlib with pip install

(36)

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

(37)

Referensi

Dokumen terkait

This chapter walks you through the process of registering as an iPhone developer and setting up your work environment, from installing Xcode and the iPhone SDK to generating

Chapter 1, “Python and its Features”: In this chapter, you will have a detailed introduction to Python and its features, such as installing Python on different platforms,

Although this book provides solid coverage of the Python 3 language and the built-in functions and most commonly used modules in the standard library, Python’s online

Now (if we are using my repository), run the following command to install OpenCV with Python 2.7 bindings and support for depth cameras, including Kinect:.. $ sudo port

The following example demonstrates running Python interactively from the command line and then running the hello.py program.. Executing a

c Demonstrate, by running a program, that you can take one large time step with the Backward Euler scheme and compute the solution of 5.38.. The solution is very boring since it is

Wes McKinney 2022, "Python for Data Analysis: Data Wrangling with pandas, NumPy, and Jupyter", 3rd Edition, O'Reilly Media... 132 Wes McKinney 2022, "Python for Data Analysis: Data

Thus, the author will account about image processing for the detection of objects used in research with three object recognition parameters using a webcam as a sensing sensor, and image