You are on page 1of 57

Pengenalan

Python, PCAP, dan


Modul 1
Guntur Budi Herwanto, M.Cs.
Halo

Guntur Budi Herwanto, S.Kom, M.Cs.


Alumni S1 & S2 Ilmu Komputer UGM
Dosen di Program Studi Ilmu Komputer UGM
Laboratorium Rekayasa Perangkat Lunak, Komputasi
dan Data, Departemen Ilmu Komputer dan
Elektronika, Fakultas MIPA, Universitas Gadjah Mada

Guntur Budi Herwanto gunturbudi@ugm.ac.id


Agenda

1. Lingkungan Pembelajaran di Netacad


2. Modul 1
3. Instalasi Python
Lingkungan Pembelajaran di Netacad
Lingkungan Pembelajaran di Netacad
Lingkungan Pembelajaran di Netacad
Lingkungan Pembelajaran di Netacad
Lingkungan Pembelajaran di Netacad
Lingkungan Pembelajaran di Netacad
Lingkungan Pembelajaran di Netacad
HOW DOES A COMPUTER
PROGRAM WORK?
A program makes a computer usable. Without a
program, a computer, even the most powerful
one, is nothing more than an object. Similarly,
without a player, a piano is nothing more than a
wooden box.
HOW DOES A SOFTWARE
PROGRAM CREATED?
COMPILATION
VS
INTERPRETATION
WHAT IS PYTHON?
ARTIFICIAL INTELLIGENCE
WHO IS PYTHON CREATOR?
In December 1989, Van Rossum had
been looking for a "'hobby'
programming project that would keep
[him] occupied during the week
around Christmas"
PYTHON GOALS!

In 1999, Guido van Rossum defined his goals


for Python:
• an easy and intuitive language just as
powerful as those of the major competitors;
• open source, so anyone can contribute to
its development;
• code that is as understandable as plain
English;
• suitable for everyday tasks, allowing for
short development times.
Fun fact. Python
is not named after
the snake. It’s
named after the
British TV show
Monty Python.
PYTHON
HISTORY
WHY PYTHON?
WHY PYTHON?

Solve complex
problems in less
time with fewer
lines of code
HUGE CROSS-
HIGH-LEVEL
COMMUNITY PLATFORM

LARGE
ECOSYSTEM

WHY PYTHON?
WHY
PYTHON?
A multi-purpose language with a
simple, and beginner – friendly
syntax

WHY
PHTYON
PYTHON DRAWBACKS
• it's not a speed demon - Python does not deliver exceptional
performance

• in some cases it may be resistant to some simpler testing techniques -


this may mean that debugging Python's code can be more difficult than
with other languages; fortunately, making mistakes is always harder in
Python.
PYTHON DRAWBACKS

Despite Python's growing popularity, there are still


some niches where Python is absent, or is rarely seen:

• low-level programming (sometimes called "close to


metal" programming): if you want to implement an
extremely effective driver or graphical engine, you
wouldn't use Python;
• applications for mobile devices: although this
territory is still waiting to be conquered by Python, it
will most likely happen someday.
PYTHON 2.0 VS PYTHON 3.0
Python 2 vs Python 3

Python aka Cpyton


There is
more than Cython
one Python
Jython

Pypy and Rpython


Python 2 vs Python 3

• Python 2 is an older version of the original Python.


• Its has not been developed
• The updates are issued on regular basis, like fixing bugs and security holes
•  Python 2's development path has reached a dead end already.
• Python 3 is the newer version of language
• These two versions of Python aren't compatible with each other. 
• Python 3 is better than python 2
Basis of comparison Python 2.X Python 3.X

Function print print 9/4 print(9/4)


print “cta” print(“cta”)

Division of Integers When two integers are divided, Whenever two integers are
you always provide integer divided, you get a float value
value.

Not difficult to port python 2 Python version 3 is not


Backward compatibility to python 3 but it is never backwardly compatible with
reliable. Python 2.

Differences between
Python 2 & Python 3
ANOTHER FORM OF PYTHON
CPython:
CPython • Maintained by the people gathered around the
and PSF (Python Software Foundation)Python aka
Cpyton
Cython • These Pythons are called canonical
• Considered to be reference Pythons
• All Pythons coming from the PSF are written in
the "C" language.

Cython:

• Cython is a C extension of Python.


• Cython can call C functions.
"J" is for "Java".

Jython
Python written in Java

Jython can communicate with existing


Java infrastructure more effectively.
The current Jython implementation
follows Python 2 standards.
PyPy  - a Python within a Python
PyPy
and
RPython A Python environment written in Python-like
language named RPython (Restricted Python).

A tool for people developing Python than for


the rest of the users.

PyPy is compatible with the Python 3


language.
BEGIN YOUR PYTHON JOURNEY
https://youtu.be/7lv9uW0reYM
https://youtu.be/xAxa-1YSEFo
• Sandbox allows Python code to be run in an Internet browser.
• The Sandbox interface consists of three main parts:
• the Editor window, which lets you type in your code,
• the Console window, which lets you see the output of your
programs,
• a tool named the Action Buttons bar, which lets you run
your code, refresh the editor window,
• and the Settings button, which lets you adjust display
Sandbox settings and switch between Python/C/C++ environments.
Sandbox
Extra
Algorithm
• Set of instructions, typically to solve a class of
problems or perform a computation
• Algorithms are essential to the way computers
process data.
• Algorithms can be expressed in many kinds of
notation, including natural languages, pseudocode,
flowcharts, or programming languages.
Example - Sort this!

3 6 2 7 1 8
QnA
• Opsi lain (Jupyter versi online): https://colab.research.google.com
• Quiz ada di akhir modul
• Pastikan jika masih ada kendala dengan email (tidak bisa masuk
netacad) bertanya ke helpdesk ataupun buat list di grup telegram
• PCAP: Fokus ke Pemrograman Dasar dan Sintaks Python bukan ke
spesifik aplikasi (web ataupun daata analis)
• https://netacad.com Pastikan mengisi agreement dan survei untuk
bisa mengakses modul
• Recording akan di share
Terima Kasih

You might also like