1. Introduction to Python
Python is a high-level, interpreted programming language known for its simplicity and
readability.
2. Python Basics
2.1 Variables & Data Types
Variables store data in Python. No need to declare types.
•Data Types:
• 𝚒𝚗𝚝 - whole number (e.g., x = 5)
• 𝚏𝚕𝚘𝚊𝚝- decimal number (e.g, y = 1.5)
• 𝚜𝚝𝚛𝚒ng- Text (e.g., name = “max”)
• 𝚋𝚘𝚘𝚕- True / false (e.g., is_student = True)
•Diagram: variable Assignment
x = 10 # Integer
y = "Hello" # String
z = 3.5 # Float
2.2 Basic Input and Output
name = input("Enter your name: ") # Takes user input
print("Hello,", name) # Prints output
3. Operators in python:
Operators Description Example
+ Addition 2+3=5
- Subtraction 7-4=3
* Multiplication 2 * 5 = 10
/ Division = 5
// Floor Division 10 // 3 = 3