Day 1
Day 1
Fundamentals
Phase- I
What is Python ?
Python is a high-level, interpreted programming language known for its simplicity and readability. It was
created by “Guido van Rossum” and first released in 1991. Python supports multiple programming
paradigms, including procedural, object-oriented, and functional programming.
Advantages:
Windows:
1. https://www.anaconda.com/download
2. Open the anaconda.exe file as administrator
3. Make it for All users
4. Anaconda prompt and type python ide
Data Types
Data Types
Primitive Non-Primitive
Integer
Linear Non-Linear
Float
Character Tree
Static Dynamic
Boolean Stack
Queue
Primitive DataTypes
In programming, type conversion is the process of converting data of one type to another. There are two
types of type conversion in Python.
1. Arithmetic Operators
Operator Example
Addition 5+2=7
Subtraction 5–2=3
Multiplication 5 * 2 = 10
Division 5 / 2 = 2.5
Floor Division 5 // 2 = 2
Modulo 5%2=1
Power 5 ** 2 = 25
Python Operators
2. Assignment Operators
Operator Example
Addition Assignment a += 1 or a = a + 1
Subtraction Assignment a -= 3 or a = a - 3
Multiplication Assignment a *= 4 or a = a * 4
Division Assignment a /= 3 or a = a / 3
Remainder Assignment a %= 10 or a = a % 10
Exponent Assignment a **= 10 or a = a ** 10
Python Operators
3. Comparison Operators
Operator Example
Is Equal To 3 == 5 gives us False
4. Logical Operators
Operator Example
Logical AND:
a and b True only if both the operands are
True
Logical OR:
a or b True if at least one of the operands
is True
Logical NOT:
not a True if the operand is False and
vice-versa.
Python Operators
5. Bitwise operators
Operator Example
Bitwise AND x & y = 0 (0000 0000)
6. Special operators
Operator Example
is x is True
Operator Example
in 5 in x
not in 5 not in x