Introduction
Installation and conguration guide for Python
My rst programs in Python 3
Lesson 1 : Introduction to Python 3
Nabil BOUMEDINE
[email protected]
UMBB, Faculty of Mathematics, Department of Operations research, Algeria
Speciality : ROOMS
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
Outlines
1 Introduction
2 Installation and conguration guide for Python
3 My rst programs in Python 3
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
Outlines
1 Introduction
2 Installation and conguration guide for Python
3 My rst programs in Python 3
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
Python in lines
Python is certainly the simplest and easiest-to-use programming
language available today. It's easy to read and write Python
code, which is brief without being cryptic. Python is a very
powerful language, so we can generally write much less code in
Python than we would in, say, C++ or Java, to create an
equivalent application.
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
Python in lines
This programming language has many interesting
characteristics :
1 Multi-platform. In other words, it runs on a wide range of
operating systems, including Windows, Mac OS X, Linux,
Android and iOS.
2 Free of charge. You can install it on as many computers as
you like ( including your phone !).
3 It's an open language. A Python script doesn't need to be
compiled in order to be executed, unlike languages such as
C or C++.
4
Note : This course is based on Python version 3, which has
become the standard for Python.
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
Outlines
1 Introduction
2 Installation and conguration guide for Python
3 My rst programs in Python 3
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
Installation and conguration guide for Python
Python is a powerful language that has been widely used in the
eld of data science. Among the many Python IDEs available,
Spyder is distinguished by its comprehensive functionality and
easy-to-use interface.
This section provides a detailed description of the installation of
Python and the running of Spyder with Python 3 using
Anaconda, which is a popular Python distribution for data
science.
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
Installation and conguration guide for Python
Python is a powerful language that has been widely used in the
eld of data science. Among the many Python IDEs available,
Spyder is distinguished by its comprehensive functionality and
easy-to-use interface.
This section provides a detailed description of the installation of
Python and the running of Spyder with Python 3 using
Anaconda, which is a popular Python distribution for data
science.
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
Installing Anaconda
You can install other modules that are particularly helpful in
bioinformatics (NumPy, scipy, matplotlib, pandas, Biopython),
as well as Jupyter Lab, which enables you to edit Jupyter
notebooks, using the conda package manager, which is included
with anconda.
For installing Miniconda on
https://store.continuum.io/cshop/anaconda/, Python 3, and the
other modules required for this course, you can nd step-by-step
instructions https://python.sdv.univ-paris-diderot.fr/livre-dunod/.
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
Installing Anaconda
Step 1 : Download the Anaconda Installer
Step 2 : Run the Installer
Step 4 : Verify the Installation : fter the installation is complete,
you can verify it by opening a new Command Prompt window
and typing the following command :
python version
Step 5 : Go to anaconda and instal spyder and run it.
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
Outlines
1 Introduction
2 Installation and conguration guide for Python
3 My rst programs in Python 3
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
basic operations
Oeration instruction example result
Visualization print print(5) 5
Input input input("give me a number")
Addition + 2+3 5
Multiplication * 2*3 6
Power ** 2**3 8
Type element type(3) int number int
Subtraction - 2-3 -1
Division / 3/2 1.5
entire division // 3//2 1
modulo % 3%2 1
absolute value abs abs(2-3) 1
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
input function
1 Inputting a character string : name = input("input your
name : ")
print("Hello my name is ", name, " !")
2 Enter an integer : n = int(input("input an integer : "))
print("the type of n is :", type(n)))
3 Inputting a oat number : x = oat(input("input oat : "))
print("the type of n is :", type(x))
print(x)
4 Enter a operation : x = eval(input("Enter for example 3/4 :
"))
print("The type of variable x :", type(x))
print(x)
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
matrix and vecteur operation with numpy
The numpy library contains essential functions for dealing with
arrays, matrices and linear algebra-like operations with Python.
1 array : type befor all : import numpy as np
A = np.array([1 ,2 ,3 ,4])
print(A) print("Hello my name is ", name, " !")
2 Matrix : import numpy as np
A = np.array([[1 ,2 ,3 ,4] ,[5 ,6 ,7 ,8]])
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
matrix and vecteur operation with numpy
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
matrix and vecteur operation with numpy
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
for, if and while with numpy
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
matrix and vecteur operation with numpy
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
matrix and vecteur operation with numpy
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
matrix and vecteur operation with numpy
1
Introduction
Installation and conguration guide for Python
My rst programs in Python 3
matrix and vecteur operation with numpy