11. Python is a programming language that supports the creation of a wide
range of applications. Developers regard it as a great choice for Machine
Learning, and Deep Learning projects
What is Python !
Why python
• It has a huge number of libraries and frameworks
• Simplicity
• The massive online support
• Fast development
• Visualization tools
12. PyCharm is an IDE (Integrated Development Environment) made specifically
for use with Python. You’ll need it for this workshop. You can also use
Anaconda (Jupyter Notebook) , Google Colab , Kaggle … etc
What is Pycharm !
15. Variable assignement :Here we create a variable called num and assign it the value of 0
using =, which is called the assignement operator
Aside: if you’ve programmed in certain other languages (like java or C++), you
might be noticing some things Python doesn’t require us to do here:
●We don’t need to « declare » num before assigning to it
●We don’t need to tel Python what type of value num is going to refer to .In fact, we
can even go on to reassign num to refer a different sort of thing like a string or a
boolean.
Variable assignement
18. Numbers and Arithmetic in python
“Number” is a fine informal name for the kind of thing, but if we wanted to be more
technical, we could ask python how it would describe the type of thin that num is :
20. Examples
It always give us a float.
The // operator give us the result that’s rounded down to the next integer.
21. The arithmetic we learned in primary school coventions about the order in which operations are
evaluated.
Some remember these by a mnemonic such as PEMDAS (Parentheses, Exponents, Multiplication/Division,
Addition/Subtraction).
Python follows similar rules about which calculations to perform first.They’re mostly pretty intuitive.
Order of Operations
41. Lists
Lists in Python represent orders sequence of values.Here is an example of how to create the:
We can put other type of things in lists:
We can even make a list of lists
43. Slicing
What are the three first planets? We can answer this question using slicing:
Planets[0:3] is our way of asking for the elements of planets starting from index 0 and continuing up
to but not including index 3
The starting and ending indices are both optional. If I leave out the start index, it’s assumed to be
0. So I could rewrite the expression above as :