Python+for+Non Programmers
Python+for+Non Programmers
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Best Jobs?
Cyber-Security
DevOps
Full Stack
Cloud Architect
Machine Learning
Data Scientist
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Applications of Programming Languages
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
What is Data?
13.4
My Name is Sam
287
(a+b)2 0 1
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
How to Store Data?
“John”
123
TRUE
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Need of Variables
Student
“John”
0x1098ab
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Example of Variable
a+b
10 a
a-b
a/b
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Decision Making Statements
If
else
It’s raining:
Go out and Play Football
Sit inside
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Decision Making Statements
If
else
Marks > 70:
Give Practice Test
Get Ice-cream
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
if…else Pseudo Code
If(condition){
Statements to be executed….
}
else{
Statements to be executed….
}
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Looping Statements
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Looping Statements
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Looping Statements
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
While Loop Pseudo Code
while(TRUE){
Keep executing statements….
}
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Functions in Real Life
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Functions in Programming World
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Object Oriented Programming
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Classes
Properties Behavior
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Objects
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
How do you solve a problem?
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Step by Step Approach
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
What is an Algorithm?
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Algorithm to find if number is even/odd
Start
Take Number
If number
Even Number Odd Number
% 2 == 0
End
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Introduction to Python
Cross-Platform
Compatible
Object Oriented
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Installing Python
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Installing PyCharm
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Installing Anaconda
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Intro to Jupyter Notebook
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Variables in Python
“John”
“Sam”
“Matt”
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Variables in Python
Student
“John”
0x1098ab
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Variables in Python
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
DataTypes in Python
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Operators in Python
Arithmetic Operators
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Python Tokens
Keywords
Identifiers
Literals
Operators
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Data-Structures in Python
Tuple List
Dictionary Set
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Tuple in Python
tup1=(1,’a’,True)
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Extracting Individual Elements
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Modifying a Tuple
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Tuple Basic Operations
Concatenating Tuples
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
List in Python
l1=[1,’a’,True]
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Extracting Individual Elements
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
List Basic Operations
Concatenating Lists
Repeating elements
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Dictionary in Python
Fruit={"Apple":10,"Orange":20}
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Extracting Keys and Values
Extracting Keys
Extracting Values
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Modifying a Dictionary
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Set in Python
s1={1,"a",True}
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Set Operations
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Set Functions
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
If Statement
If
else
It’s raining:
Go out and Play Football
Sit inside
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
If Statement
If
else
Marks > 70:
Give Practice Test
Get Ice-cream
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
if…else Pseudo Code
If(condition){
Statements to be executed….
}
else{
Statements to be executed….
}
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Looping Statements
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
While Loop
Syntax:
Enter While loop
while condition:
Test Execute Statements
Expression
Body of While
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
For Loop
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Functions in Real Life
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Python Functions
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Python Object Oriented Programming
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Classes
Properties Behavior
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Attributes and Methods
color
Attributes
cost
Play Game
Methods
Make Call
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Objects
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Objects in Python
a = 10 b = 20 c = 30
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Creating the first Class
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Inheritance in Python
With inheritance one class can derive the properties of another class
Man inheriting
features from his
father
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Libraries in Python
Python library is a collection of functions and methods that allows you to perform many actions without writing your code
NumPy
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited