PYTHON HANDWRITTEN NOTES (Beginner)
1. Introduction to Python
Python is a high-level, easy and powerful programming language.
It is used in AI, ML, Data Science, Web Development and Automation.
2. Variables
Variables store data.
Example:
a = 10
name = 'Dhruv'
3. Data Types
int -> numbers
float -> decimal
str -> text
bool -> True/False
list, tuple, set, dictionary
4. Input and Output
print() -> output
input() -> user input
5. Operators
Arithmetic: + - * / %
Comparison: == != > <
Logical: and, or, not
6. Conditional Statements
if, elif, else
Example:
if a > 10:
print('Greater')
7. Loops
for loop and while loop
Used to repeat tasks.
8. Functions
Reusable blocks of code.
def add(a, b):
return a + b
9. Lists
Ordered collection.
Example:
l = [1,2,3]
10. Dictionary
Key-value pair.
d = {'name':'Dhruv'}
11. OOP Basics
Class and Object.
12. Important Libraries
NumPy, Pandas, Matplotlib.
END