Introduction to IPython

12

Click here to load reader

Transcript of Introduction to IPython

Page 1: Introduction to IPython

IPhytonEditor Interaktif Saintis di Python

Hirwanto

Session IIntroduction and Basic Operation Mathematics

25 Nopember 2014

Page 2: Introduction to IPython

Memulai IPython Perintah Sederhana

Daftar Isi

1 Memulai IPythonInstalasiCara Membuka IPythonTampilan IPython

2 Perintah SederhanaOperasi PenjumlahanOperasi PenguranganOperasi PerkalianOperasi PembagianPerpangkatanSisa Pembagian

Page 3: Introduction to IPython

Memulai IPython Perintah Sederhana

Motivasi

IPython merupakan editor interaktif saintis di Python. Salah satutujuan dibuat di IPython adalah untuk menampilkan data besertahasil dalam satu tempat.

Page 4: Introduction to IPython

Memulai IPython Perintah Sederhana

Instalasi

Secara sederhana, instalasi dapat dilakukan seperti ini :

pip install ipython

atau.

easy_install ipython

atau secara manual

python setup.py install

Page 5: Introduction to IPython

Memulai IPython Perintah Sederhana

Cara Membuka IPython

Secara sederhana, kamu bisa membuka IPython dengan caraberikut :

Klik R + ikon Windows kemudian ketik cmd

Klik OK,

Pada kotak dialog command prompt, ketik ipython dantunggu hingga terbuka command prompt IPython.

Page 6: Introduction to IPython

Memulai IPython Perintah Sederhana

Tampilan IPython

Tampilan IPython seperti ini :

Perintah In untuk mengetik perintah dan Out untuk hasil perintah.

Page 7: Introduction to IPython

Memulai IPython Perintah Sederhana

Operasi Penjumlahan

In[1] : 2009+2014

Out[1]: 4023

Page 8: Introduction to IPython

Memulai IPython Perintah Sederhana

Operasi Pengurangan

In[2] : 2009-2014

Out[2] : -5

Akan didapat :

Page 9: Introduction to IPython

Memulai IPython Perintah Sederhana

Operasi Perkalian

In[3] : 2009*2014

Out[3] : 4046126

Page 10: Introduction to IPython

Memulai IPython Perintah Sederhana

Operasi Pembagian

In[4] : 2009/2014

Out[4] : 0.9975173783515392

Page 11: Introduction to IPython

Memulai IPython Perintah Sederhana

Perpangkatan

In[5] : 2009**5

Out[5] : 32726509225669049

Page 12: Introduction to IPython

Memulai IPython Perintah Sederhana

Sisa Pembagian

In[5] : 2014%2009

Out[5] : 5