You are on page 1of 50

Introduction

To Python
Programming
Hello!
I am Eslam Ahmed
I am a software engineer.
You can find me at jeksogsa@gmail.com
Hello!
I am Eman Ehab
I am a ML research engineer.
You can find me at
emanehab.ieee@gmail.com
Introduction to Python programming Course Outline

⬡ Intro to Computer Science ⬡ File Handling


⬡ Environment Setup (Anaconda) ⬡ If Conditions
⬡ Command Line ⬡ For Loops
⬡ Conda & pip package managers ⬡ Built-in functions & Operators (zip, enumerate, range, …)
⬡ Jupyter Notebook ⬡ List Comprehensions
⬡ Input & Output ⬡ Functions
⬡ Variables ⬡ Lambda Expressions
⬡ Data types ⬡ Map, Filter, Reduce
∙ Numbers & Math

∙ Boolean & Comparison and Logic
Variables Scope

∙ Strings ⬡ Modules & Packages


∙ Lists
∙ Tuples
∙ Sets
∙ Dictionaries
Introduction to Python programming Course Outline

⬡ Intro to Computer Science ⬡ File Handling


⬡ Environment Setup (Anaconda) ⬡ If Conditions
⬡ Command Line ⬡ For Loops
⬡ Conda & pip package managers ⬡ Built-in functions & Operators (zip, enumerate, range, …)
⬡ Jupyter Notebook ⬡ List Comprehensions
⬡ Input & Output ⬡ Functions
⬡ Variables ⬡ Lambda Expressions
⬡ Data types ⬡ Map, Filter, Reduce
∙ Numbers & Math

∙ Boolean & Comparison and Logic
Variables Scope

∙ Strings ⬡ Modules & Packages


∙ Lists
∙ Tuples
∙ Sets
∙ Dictionaries
Intro to Computer Science

⬡ How Computers Work


⬡ Decimal & Binary numbering systems
⬡ How computer stores Words (ASCII)
⬡ How computer stores Images
⬡ How computer stores Videos
⬡ How computer stores Audio
⬡ Technology Tree
⬡ Why python
Intro to Computer Science

⬡ How Computers Work


⬡ Decimal & Binary numbering systems
⬡ How computer stores Words (ASCII)
⬡ How computer stores Images
⬡ How computer stores Videos
⬡ How computer stores Audio
⬡ Technology Tree
⬡ Why python
How Computers Work
Intro to Computer Science

⬡ How Computers Work


⬡ Decimal & Binary numbering systems
⬡ How computer stores Words (ASCII)
⬡ How computer stores Images
⬡ How computer stores Videos
⬡ How computer stores Audio
⬡ Technology Tree
⬡ Why python
Decimal & Binary numbering systems
Decimal & Binary numbering systems
Intro to Computer Science

⬡ How Computers Work


⬡ Decimal & Binary numbering systems
⬡ How computer stores Words (ASCII)
⬡ How computer stores Images
⬡ How computer stores Videos
⬡ How computer stores Audio
⬡ Technology Tree
⬡ Why python
How computer stores Words (ASCII)

Full Table
http://www.asciitable.com/
Intro to Computer Science

⬡ How Computers Work


⬡ Decimal & Binary numbering systems
⬡ How computer stores Words (ASCII)
⬡ How computer stores Images
⬡ How computer stores Videos
⬡ How computer stores Audio
⬡ Technology Tree
⬡ Why python
How computer stores Images
How computer stores Images

Pixels
Every pixel is one color
Height

Width
How computer stores Images

RGB Digital Images


We can generate any color by mixing
(red, green, blue) colors with different ratios.
How computer stores Images (Red)
How computer stores Images (Green)
How computer stores Images (Blue)
How computer stores Images (White)
How computer stores Images (Black)
How computer stores Images (Pink)
How computer stores Images (Yellow)
How computer stores Images

Resolution: 100x100

Width : 100 pixels


Height: 100 pixels
How computer stores Images
Intro to Computer Science

⬡ How Computers Work


⬡ Decimal & Binary numbering systems
⬡ How computer stores Words (ASCII)
⬡ How computer stores Images
⬡ How computer stores Videos
⬡ How computer stores Audio
⬡ Technology Tree
⬡ Why python
How computer stores Videos
Intro to Computer Science

⬡ How Computers Work


⬡ Decimal & Binary numbering systems
⬡ How computer stores Words (ASCII)
⬡ How computer stores Images
⬡ How computer stores Videos
⬡ How computer stores Audio
⬡ Technology Tree
⬡ Why python
How computer stores Audio
Intro to Computer Science

⬡ How Computers Work


⬡ Decimal & Binary numbering systems
⬡ How computer stores Words (ASCII)
⬡ How computer stores Images
⬡ How computer stores Videos
⬡ How computer stores Audio
⬡ Technology Tree
⬡ Why python
Programming ?!

Just writing code for executing some


sequential instructions to perform
various tasks.

Computers are FAST but DUMB, they


need to know what to do.
Technology Tree

⬡ Embedded Systems ⬡ Security & Ethical Hacking


⬡ Operating Systems ⬡ Machine & Deep Learning
⬡ Desktop Applications ⬡ Data Science
⬡ Web Applications ⬡ Computer Vision
⬡ Mobile Applications ⬡ Speech Processing
⬡ Database Systems ⬡ Natural Language Processing
⬡ Networking & Server administration ⬡ Autonomous
⬡ Internet of Things ⬡ Blockchain
⬡ Game Development ⬡ Big Data
⬡ AR / VR ⬡ Computer Graphics
⬡ Compression ⬡ Compiler Design
⬡ Encryption ⬡ …
Intro to Computer Science

⬡ How Computers Work


⬡ Decimal & Binary numbering systems
⬡ How computer stores Words (ASCII)
⬡ How computer stores Images
⬡ How computer stores Videos
⬡ How computer stores Audio
⬡ Technology Tree
⬡ Why python
Why Python ?!
>_ Easy to Learn, Read, Maintain.

>_ Very Big Community so you will find a lot of


Libraries to use.
Python 2 vs 3 ?!
Introduction to Python programming Course Outline

⬡ Intro to Computer Science ⬡ File Handling


⬡ Environment Setup (Anaconda) ⬡ If Conditions
⬡ Command Line ⬡ For Loops
⬡ Conda & pip package managers ⬡ Built-in functions & Operators (zip, enumerate, range, …)
⬡ Jupyter Notebook ⬡ List Comprehensions
⬡ Input & Output ⬡ Functions
⬡ Variables ⬡ Lambda Expressions
⬡ Data types ⬡ Map, Filter, Reduce
∙ Numbers & Math

∙ Boolean & Comparison and Logic
Variables Scope

∙ Strings ⬡ Modules & Packages


∙ Lists
∙ Tuples
∙ Sets
∙ Dictionaries
ANACONDA
Awesome Python Distribution.

Free and open-source distribution of the Python and R


programming languages for scientific computing (data
science, machine learning applications) . Anaconda
distribution includes data-science packages suitable for
Windows, Linux, and macOS.

https://www.anaconda.com
Visual Studio Code

Awesome Code Editor.

https://code.visualstudio.com
Introduction to Python programming Course Outline

⬡ Intro to Computer Science ⬡ File Handling


⬡ Environment Setup (Anaconda) ⬡ If Conditions
⬡ Command Line ⬡ For Loops
⬡ Conda & pip package managers ⬡ Built-in functions & Operators (zip, enumerate, range, …)
⬡ Jupyter Notebook ⬡ List Comprehensions
⬡ Input & Output ⬡ Functions
⬡ Variables ⬡ Lambda Expressions
⬡ Data types ⬡ Map, Filter, Reduce
∙ Numbers & Math

∙ Boolean & Comparison and Logic
Variables Scope

∙ Strings ⬡ Modules & Packages


∙ Lists
∙ Tuples
∙ Sets
∙ Dictionaries
Command Line

>_ cd

>_ dir

>_ copy

>_ del

>_ move


Introduction to Python programming Course Outline

⬡ Intro to Computer Science ⬡ File Handling


⬡ Environment Setup (Anaconda) ⬡ If Conditions
⬡ Command Line ⬡ For Loops
⬡ Conda & pip package managers ⬡ Built-in functions & Operators (zip, enumerate, range, …)
⬡ Jupyter Notebook ⬡ List Comprehensions
⬡ Input & Output ⬡ Functions
⬡ Variables ⬡ Lambda Expressions
⬡ Data types ⬡ Map, Filter, Reduce
∙ Numbers & Math

∙ Boolean & Comparison and Logic
Variables Scope

∙ Strings ⬡ Modules & Packages


∙ Lists
∙ Tuples
∙ Sets
∙ Dictionaries
conda & pip package managers

https://anaconda.org/

https://pypi.org/
Introduction to Python programming Course Outline

⬡ Intro to Computer Science ⬡ File Handling


⬡ Environment Setup (Anaconda) ⬡ If Conditions
⬡ Command Line ⬡ For Loops
⬡ Conda & pip package managers ⬡ Built-in functions & Operators (zip, enumerate, range, …)
⬡ Jupyter Notebook ⬡ List Comprehensions
⬡ Input & Output ⬡ Functions
⬡ Variables ⬡ Lambda Expressions
⬡ Data types ⬡ Map, Filter, Reduce
∙ Numbers & Math

∙ Boolean & Comparison and Logic
Variables Scope

∙ Strings ⬡ Modules & Packages


∙ Lists
∙ Tuples
∙ Sets
∙ Dictionaries
Run Python Script via Command Line

1- Make a .py file

2- Write code & Save it

3- Open cmd

4- >_ python file.py


Run Python via Jupyter Notebook

1- Open cmd in a folder

2- >_ jupyter notebook


Jupyter Notebook
⬡ Create new .ipynb file
⬡ Naming the notebook
⬡ Menu buttons (Run, Insert, Delete cells, etc…)
⬡ Move Cell up or down
⬡ Copy, Paste and Cut Cells
⬡ Merge Cells
⬡ Saving the notebook for checkpoints
⬡ Code and Markdown Cells
⬡ Export .py file
⬡ Kernel
⬡ Use command line in Jupyter using ‘!’ operator
Jupyter Notebook (Shortcuts)
⬡ Ctrl + Enter --- > Execute Cell
⬡ Shift + Enter --- > Execute Cell then go to the next cell
⬡ Alt + Enter --- > Execute Cell then insert new cell below
⬡ A and B --- > Insert Cell Above or Below
⬡ Shift + Up or Down --- > Select Cells Above or Below
⬡ C and V and X --- > Copy, Paste and Cut Cells inside Notebook
⬡ Ctrl + C or V or X --- > Copy, Paste and Cut Cells outside Notebook
⬡ Double D --- > Delete Cells
⬡ Shift + M --- > Merge Cells
⬡ Y and M --- > Make Cell type Code or Markdown
⬡ S --- > Save Notebook

https://www.audiolabs-erlangen.de/resources/MIR/FMP/B/B_Jupyter.html
Questions ?!
Thanks!
>_ Live long and prosper

You might also like