AI_Python_Combined_Revision
AI_Python_Combined_Revision
PYTHON REVISION
1. VARIABLES
Example:
x = 10
name = "AI"
2. DATA TYPES
- list: [1, 2, 3]
- tuple: (1, 2, 3)
3. TYPE CONVERSION
int("5") => 5
4. ARITHMETIC OPERATORS
+ : Addition (3 + 2 = 5)
- : Subtraction (5 - 1 = 4)
* : Multiplication (2 * 3 = 6)
% : Modulus (10 % 3 = 1)
** : Exponentiation (2 ** 3 = 8)
== : Equal to (5 == 5 is True)
Logical Operators:
Example:
temp = 25
print("Hot")
else:
print("Cold")
7. LOOPS
For Loop:
print(i)
While Loop:
i=1
while i <= 3:
print(i)
i += 1
Loop Control:
1. AI PROJECT CYCLE
Stages:
2. DOMAINS OF AI
a) Statistical Data: Used for finding patterns (e.g. price comparison websites).
b) Computer Vision: AI understanding visual input like images/videos (e.g. facial recognition).
c) Natural Language Processing (NLP): Machines understand human language (e.g. chatbots,
Google Translate).
3. ETHICAL FRAMEWORKS
Why Needed:
Types:
- Value-Based:
- Rights-Based: Focus on human dignity and freedom
4. BIOETHICS PRINCIPLES
- Bioethics helps: ensure data is fair, accurate and unbiased to avoid harm