Introduction to Python

Python Guide for Beginners
Python Operators
In Python Introduction, operators are special symbols or keywords used to perform operations on values or variables. These operations can range from simple arithmetic to logical comparisons and data manipulations. Operators allow you to build expressions and logic within your Python programs.
Types of Operators
- Arithmetic Operators (+,-,*,/,%)
- Comparison Operators (<,<=,>=,==,!=)
- Logical Operators (AND, OR, NOT)
- Bitwise Operators (&,|,<<,>>,-,^)
- Assignment Operators (=,+=,-=,%=)
- Identity Operators and Membership Operators. These are the operators majorly used in Python Introduction
Data Types in Python
- There are many types of data types in Python but some are commonly used like ( Int, Float, String, Boolen, Complex).
- Integer
- Float
- String
- Boolen
- Complex
- Bytes
- Bytearray
- Range
- List
- Tuple
- Set
- Frozenset
- Dict
- None
Explanation of Data Types
- Integer Data Type:
We can use the Int data type to represent the whole numbers (integral value) Example If a=10

2. Float Data Type:
We can use float data type to represent the decimal values.

3. String Data Type:
Str represents the String data type. A String is a sequence of characters.
Note: If Str is empty str then, it should be false.
4. Boolen Data Type:
We represent either True or False. Any non-zero number should be true.

5. Complex Data Type:
Complex data type represents the numbers which is written in form of a+bj or a-bj.

ARITHEMATIC OPERATOR IN PYTHON
Arithmetic operators used to perform mathematical calculation using below symbols.
Situations | Operator | Description | Syntax with example |
1 | + | Adding two operands | a+b (3+2=5) |
2 | – | Subtract two operands | a-b (3-2=1) |
3 | * | Multiply two operands | a*b (3*2=6) |
4 | / | Divide the operands | a/b (3/2=1.5) |
5 | // | Use to remove decimal | a//b (3/2=1) |
6 | ** | Square Root | a**b (3**2=9) |
7 | % | Find out reminder value | a%b (3%2=1) |