hjjhgjhjgjh
Oiolkjlkjlk lkjlkjlkj lkjkjl
BME
kjhkjh
• jhkjhjk
• mbnbmn
• jmnbmnb
• Khjkhkj
• M,n,mn,n,mn,mn
• nmbnmbnmbnmbmn
Hob is yyt?
Python is an interpreted, high-level, general-
purpose programming language. Created by Guido van
Rossum and first released in 1991, Python's design
philosophy emphasizes code readability with its notable use
of significant whitespace. Its language constructs
and object-oriented approach aim to help programmers
write clear, logical code for small and large-scale
projects.[27]
Why Python?
• Python is dynamically typed and garbage-collected. It supports
multiple programming paradigms, including procedural, object-
oriented, and functional programming. Python is often
described as a "batteries included" language due to its
comprehensive standard library.[28] Python supports procedure-
oriented as well as object-oriented programming.
• Python has huge pile of various libraries, such as NumPy, SciPy,
BeautifulSoup, SQLAlchemy, Matplotlib and so on…
• Python is a dynamically-typed language. You can announce variable
wherever you want and which type you want
• Python meets “Less Code, Less Time” principle.
Yykhlkj bjhkhjkgk
IDE/Editors
• VIM – Default Editor can be used in linux
• Nano – Another Command line linux editor
• Pycham- Professional Python IDE: Professional and
Community Editon
• Jupyter – Web Based application for creating live
based python code
Jupyter Notebook
• Download and Install Python: Install Jupyter:
Linux (Debian Family): For python3:
sudo apt-get update python3 -m pip install --upgrade pip
sudo apt-get install python3.6 python3 -m pip install jupyter
Linux(RPM): For Python 2:
sudo yum install python python -m pip install --upgrade
sudo yum install pip pip python -m pip install jupyter
To start Jupyter:
Mac:
jupyter notebook
brew install python
To install packages:
Windows: pip install package_name
Tradiotional next -> next -> next conda install package_name
Package Installing in Python
Check Library package was installed:
Alternatively:
Package Installing in Python
LIB1
Lib2:
Jupyter Online
• [Link]
[Link]
Jupyter Interface
Kjhjkl kjhkhl
Type Name Character Example
Number Maximum size 2^63 - 1 my_number = 1
List Mutable type – max size 4294967295 ex_1 = []
ex_2 = [‘1’,’2’,3]
String Immutable Type – no maximum limit ex_1 = ‘hello world’
Dictionary Mutable – Key value principles, key tt = { ‘name’:”Agil”,
should be immutable “age”:[1,2,3,4] }
Set Unique values my_set = {1, 2, 3}
Tuple Immutable list my_tuple = (1,2,3,4)
Bool Logical operations My_bool=True
Uytuiy jkghjkg jgjk
Number: String:
Python String Basics:
[Link]
kkjgkhj
List1: List2:
Python list basics:
[Link]
Basic Types and Operations
List
Jhgfgkg
Dictionary 1: Dictionary 2:
Python list basics:
[Link]
Basic Types and Operations
Set
Python list basics:
Operations
Python Loops and Flow Control
Python Loops and Flow Control
Python If, IF-ELSE-IF Statement
Python single line operations
Python Comments and Sensitivity
Python Functions
Python Built-in Functions
Python Built-in Functions
Python Built-in Functions
File Operations
Python Modules and Libraries
• There are lots of standard and a new developed packages
by python community. Search some built-in packages:
• [Link]
• Example For Most Used Python libraries in science:
• Numpy
• Scipy
• Matplotlib
• Pandas
NumPy
NumPy Example
NumPy Example
NumPy Example
Matplotlib
Pandas
Basic Testing
Task
• Write a program to compute the multiplication of two given
matrixes.
Input Data: p = [[1, 0], [0, 1]] , q = [[1, 2], [3, 4]]
• Write a program to compute the eigenvalues and right
eigenvectors of a given square matrix
Input Data: [[3 , -2],[1, 0]]
Useful links
1. Learn Basics of the Python:
[Link]
2. Learn Numpy:
[Link]
3. Some Examples about numpy:
[Link]
4. Learn Matplotlib:
[Link]