PAGE 1 – Introduction to Python
Python is a high-level, easy-to-read programming language.
It is widely used for web development, automation, data science, AI, and more.
PAGE 2 – Installing Python
Download Python from the official website.
After installation, you can run Python using the terminal or an IDE.
print("Hello, World!")
PAGE 3 – Variables
Variables store data in Python.
name = "Faisal"
age = 25
height = 5.8
Python does not require declaring data types explicitly.
PAGE 4 – Data Types
Common data types in Python:
String, Integer, Float, Boolean, List, Tuple, Dictionary
text = "Hello"
number = 10
price = 9.99
is_active = True
PAGE 5 – Conditional Statements
age = 18
if age >= 18:
print("Adult")
else:
print("Minor")
PAGE 6 – Loops
for i in range(5):
print(i)
count = 0
while count < 5:
print(count)
count += 1
PAGE 7 – Functions
def greet(name):
return "Hello " + name
print(greet("Faisal"))
PAGE 8 – Lists and Dictionaries
# List
fruits = ["Apple", "Banana", "Mango"]
# Dictionary
person = {
"name": "Faisal",
"age": 25
}
PAGE 9 – Working with Files
file = open("[Link]", "w")
[Link]("Hello Python")
[Link]()
PAGE 10 – Best Practices
✔ Use meaningful variable names.
✔ Follow proper indentation.
✔ Keep functions small and focused.
✔ Comment your code.
✔ Practice regularly.