AI Computer Institute
Expert-curated CS & AI curriculum aligned to CBSE standards. A bharath.ai initiative. About Us

CBSE Class 10 AI/CS Board Exam Prep

exam-prepGrades 107 sections

HTML & CSS Fundamentals (Web Design)

CBSE Class 10 Focus: Basic HTML tags, CSS styling, forms, semantic HTML.

// Basic HTML Structure
<!DOCTYPE html>
<html>
  <head>
    <title>Page Title</title>
    <meta charset="UTF-8">
  </head>
  <body>
    <!-- Content here -->
  </body>
</html>

// Common HTML Tags
<h1> to <h6>: Headings (h1 largest)
<p>: Paragraph
<a href="url">Link</a>: Hyperlink
<img src="file.jpg" alt="description">: Image
<ul>: Unordered list, <li>: List item
<ol>: Ordered list
<table>, <tr>, <td>: Tables (row, data)
<form>: Form container
<input type="text|password|email|number">: Input fields
<button>: Clickable button
<div>: Container (block)
<span>: Inline container

// CSS Selectors & Properties
Element selector: p { color: blue; }
Class selector: .myclass { color: red; }
ID selector: #myid { color: green; }

Properties:
- color: Text color
- background-color: Background
- font-size: Text size
- font-family: Font type
- margin: Space outside
- padding: Space inside
- border: Edge styling
- width, height: Dimensions
- text-align: Alignment

Example:
.button {
  background-color: blue;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}

// Form Elements
<input type="text" name="username">
<input type="password" name="pwd">
<textarea>: Multi-line text
<select>: Dropdown menu
<input type="checkbox">: Multiple selections
<input type="radio">: Single selection
<input type="submit">: Submit button

// Semantic HTML5
<header>, <nav>, <main>, <article>, <section>
<aside>, <footer>: Meaningful structure
Better for: Accessibility, SEO, code clarity

// CSS Box Model
content → padding → border → margin
width/height apply to content only
box-sizing: border-box; makes width include padding/border

Python Fundamentals for Class 10

CBSE Class 10 Programming: Variables, data types, loops, functions, basics of lists.

// Python Data Types
int: Integers (42, -5, 0)
float: Decimals (3.14, -2.5)
str: Text ("hello", 'world')
bool: True/False
list: [1, 2, "three"], mutable
tuple: (1, 2, "three"), immutable

// Variables & Input
name = "Raj"  # Assignment
age = 15
print("Hello", name)

# Input from user
user_input = input("Enter your name: ")
number = int(input("Enter age: "))

// Operators
Arithmetic: +, -, *, /, //, %, **
Comparison: ==, !=, <, >, <=, >=
Logical: and, or, not
Assignment: =, +=, -=, *=, /=

// if-elif-else Conditions
if age >= 18:
    print("Adult")
elif age >= 13:
    print("Teen")
else:
    print("Child")

// for loop (iterate known times)
for i in range(5):
    print(i)  # 0, 1, 2, 3, 4

for char in "hello":
    print(char)  # h, e, l, l, o

for item in [1, 2, 3]:
    print(item)

// while loop (iterate until condition)
count = 0
while count < 5:
    print(count)
    count += 1

// Functions
def greet(name):
    return "Hello, " + name

result = greet("Priya")  # "Hello, Priya"

def add(a, b):
    return a + b

sum_val = add(5, 3)  # 8

// Lists (mutable sequences)
fruits = ["apple", "banana", "orange"]
fruits[0]  # "apple"
fruits.append("grape")  # Add at end
fruits.insert(1, "cherry")  # Insert at index 1
fruits.pop()  # Remove last
fruits.remove("banana")  # Remove by value
len(fruits)  # Length
fruits.sort()  # Alphabetical
fruits.reverse()  # Reverse

// String Methods
s = "Hello World"
s.lower()  # "hello world"
s.upper()  # "HELLO WORLD"
s.replace("World", "Python")  # "Hello Python"
s.split()  # ["Hello", "World"]
len(s)  # 11

Cybersecurity Awareness

CBSE Class 10 includes: Digital safety, password security, phishing, malware, safe browsing.

// Password Security
Strong Password = Long + Varied + Unique
Requirements:
✓ At least 8 characters (12+ better)
✓ Mix of uppercase, lowercase, numbers, symbols
✓ Not based on personal info (name, DOB)
✓ Not words from dictionary
✓ Unique per account (don't reuse)
✓ Change periodically

Weak passwords: 12345678, password, abc123, admin
Strong: Tr0p1cal!Sunset#2024

// Phishing Attacks
Fake emails pretending to be legitimate
Goal: Steal passwords, financial info
Red flags:
⚠ Suspicious sender address
⚠ Requests for password/personal info
⚠ Urgent language ("Act now!")
⚠ Links don't match sender domain
⚠ Misspellings, poor grammar

Prevention:
- Never click links in emails (type URL directly)
- Verify sender before opening attachments
- Use email filters
- Check for HTTPS in URLs

// Malware & Viruses
Virus: Infects programs, spreads via sharing
Worm: Self-replicating, spreads over network
Trojan: Looks legitimate, contains malware
Ransomware: Encrypts files, demands payment
Spyware: Monitors user activity
Adware: Displays ads

Prevention:
- Use antivirus software
- Keep OS/software updated
- Don't open suspicious files
- Avoid downloading from untrusted sites

// Safe Online Practices
✓ Use strong, unique passwords
✓ Enable two-factor authentication
✓ Use HTTPS websites (look for lock icon)
✓ Verify URLs before clicking
✓ Keep software updated
✓ Backup important files
✓ Be cautious with personal information
✓ Don't share passwords

// Digital Footprint
Everything online is permanent
Information shared can be found/misused
Be mindful of what you post
Privacy settings on social media
Review what companies collect about you

// Copyright & Intellectual Property
Plagiarism: Copying without credit
Fair use: Limited use for education/commentary
Attribution: Give credit to original authors
Respect licenses: Follow software terms

Networking Concepts

CBSE Class 10 Networking: Basic concepts, Internet protocols, communication.

// Network Basics
LAN: Local Area Network (home, school, office)
Range: ~100 meters
Speed: Fast (100 Mbps - 1 Gbps)

WAN: Wide Area Network (across cities/countries)
Range: Unlimited
Speed: Slower than LAN
Example: Internet

Internet: Global system of networks
Connected via routers, uses TCP/IP protocol

// IP Address (Internet Protocol)
IPv4: 4 numbers (0-255) separated by dots
Example: 192.168.1.1
Uniquely identifies device on network

IPv6: Newer, 128-bit, hexadecimal
Example: 2001:0db8::8a2e:0370:7334

// MAC Address (Media Access Control)
Physical address of network device
Format: 48 bits, hexadecimal
Example: 00:1A:2B:3C:4D:5E
Used on local network (LAN)

// DNS (Domain Name System)
Translates domain names to IP addresses
www.google.com → 142.250.185.46
Process: Browser asks DNS server

// Protocol: Set of rules
HTTP: Web pages (unencrypted)
HTTPS: Web pages (encrypted, secure)
FTP: File transfer
SMTP: Send email
POP3/IMAP: Receive email
SSH: Secure remote access
Telnet: Remote access (insecure)

// Common Ports
Port 80: HTTP
Port 443: HTTPS
Port 21: FTP
Port 25: SMTP (email send)
Port 110: POP3 (email receive)
Port 3306: MySQL database

// Internet Speed
Bandwidth: Maximum data rate (Mbps, Gbps)
Latency: Delay in transmission (ms)
Throughput: Actual data transfer rate
Ping: Test latency (ICMP echo)

// URL Structure
https://www.example.com:8080/path/page.html?id=123
Protocol: https://
Domain: example.com
Subdomain: www.
Port: 8080 (optional)
Path: /path/page.html
Query: ?id=123 (parameters)

AI & Machine Learning Basics

CBSE Class 10 AI Awareness: What is AI, types of learning, real-world applications, ethics.

// What is AI?
Artificial Intelligence: Machines performing tasks requiring human intelligence
Examples: Speech recognition, image classification, recommendations
Goal: Automate tasks, augment human capabilities

// Narrow vs General AI
Narrow AI (Weak AI):
- Current technology
- Trained for specific tasks
- Examples: ChatGPT, image recognition
- Cannot transfer learning to new domains

General AI (Strong AI):
- Hypothetical future technology
- Human-level intelligence
- Can learn and apply across domains
- Not yet achieved

// Types of Machine Learning

1. Supervised Learning
   Training with labeled data (input-output pairs)
   Task: Learn mapping from input to output
   Examples:
   - Classification: Email spam/not spam
   - Regression: House price prediction
   - Requires: Labeled training data

2. Unsupervised Learning
   Training with unlabeled data
   Task: Discover hidden patterns
   Examples:
   - Clustering: Grouping similar customers
   - Dimensionality reduction: Compress data
   - No labeled answers given

3. Reinforcement Learning
   Learning by interaction & rewards
   Agent: Takes action, receives reward/penalty
   Goal: Maximize cumulative reward
   Examples:
   - Game playing (AlphaGo)
   - Robot control
   - Requires: Reward signal

// Machine Learning Pipeline
1. Data Collection: Gather relevant data
2. Data Preprocessing: Clean, normalize
3. Feature Extraction: Select important features
4. Model Training: Learn patterns
5. Model Evaluation: Test on new data
6. Deployment: Use in real-world

// Key Concepts
Training Data: Used to train model
Test Data: Used to evaluate (never seen before)
Overfitting: Model memorizes training data
Underfitting: Model too simple, misses patterns
Accuracy: Percentage of correct predictions

// AI Applications (Real-World)
Image Recognition: Object detection, facial recognition
Natural Language: Chatbots, translation, sentiment analysis
Recommendation: Netflix suggestions, Amazon products
Medical: Disease diagnosis, drug discovery
Autonomous Vehicles: Self-driving cars
Robotics: Manufacturing, exploration

// AI Ethics Concerns
Bias: Algorithm discriminates against groups
Privacy: Data collection & usage
Transparency: "Black box" decisions
Accountability: Who's responsible?
Employment: Job displacement
Security: Adversarial attacks

SQL Database Basics

CBSE Class 10 Database: Tables, basic queries, data organization.

// Database Concept
Database: Organized data storage
Table: Data arranged in rows & columns
Row: Record (one instance)
Column: Field (attribute)

Example Table: Students
StudentID | Name      | Class | Marks
1         | Raj       | 10A   | 85
2         | Priya     | 10B   | 92
3         | Amit      | 10A   | 78

// SQL (Structured Query Language)
Commands to query & manage databases

// CREATE (Create table)
CREATE TABLE Students (
  StudentID INT,
  Name VARCHAR(50),
  Class VARCHAR(5),
  Marks INT
);

// INSERT (Add data)
INSERT INTO Students VALUES (1, 'Raj', '10A', 85);
INSERT INTO Students (StudentID, Name, Marks)
VALUES (4, 'Carol', 88);

// SELECT (Query data)
SELECT * FROM Students;  -- All columns
SELECT Name, Marks FROM Students;  -- Specific columns
SELECT * FROM Students WHERE Class = '10A';
SELECT * FROM Students WHERE Marks > 80;
SELECT * FROM Students ORDER BY Marks DESC;
SELECT COUNT(*) FROM Students;  -- Count rows
SELECT AVG(Marks) FROM Students;  -- Average

// WHERE Conditions
WHERE Marks > 80
WHERE Class = '10A'
WHERE Marks > 80 AND Class = '10A'
WHERE Name LIKE 'R%'  -- Starts with R
WHERE StudentID IN (1, 3, 5)

// UPDATE (Modify data)
UPDATE Students SET Marks = 90 WHERE StudentID = 2;

// DELETE (Remove data)
DELETE FROM Students WHERE StudentID = 3;

// Data Types
INT: Integers (age, marks, count)
VARCHAR(n): Text up to n characters
FLOAT/DECIMAL: Decimal numbers
DATE: Date (YYYY-MM-DD)
BOOLEAN: True/False

// Primary Key
Uniquely identifies each row
Each value must be unique
Cannot be NULL
Example: StudentID in Students table

// Relationships
One-to-Many: One student has many marks
Many-to-Many: Students in many classes, classes have many students
Foreign Key: Links to another table's primary key

Digital Ethics & Society

CBSE Class 10 Values: Responsible technology use, digital citizenship, ethical issues.

// Digital Citizenship
Online Rights & Responsibilities
- Right to privacy
- Right to freedom of expression
- Responsibility to respect others
- Responsible communication
- Protect personal information

// Cyberbullying
Definition: Harassment using digital devices
Forms: Messages, photos, videos, impersonation
Impact: Emotional distress, self-harm risk
Prevention:
✓ Don't engage with bullies
✓ Report to platform & authorities
✓ Keep evidence (screenshots)
✓ Don't share others' private information
✓ Support victims

// Online Scams & Fraud
Phishing: Fake emails for credentials
Nigerian Prince: Advance-fee fraud
Romance Scam: Emotional manipulation for money
Tech Support: Fake tech support calls
Prevention:
- Don't trust unexpected offers
- Verify before sending money
- Use reputable platforms
- Ask trusted adults

// Data Privacy
Personal Data: Name, address, phone, email
Sensitive Data: Passwords, financial info, health
Risks: Theft, misuse, discrimination
Protection:
- Use strong passwords
- Don't share unnecessary info
- Check privacy settings
- Read privacy policies
- Use VPNs on public wifi

// Digital Divide
Inequality in technology access
Affects: Education, employment, opportunities
Factors: Income, location, age, disability
Importance: Universal digital literacy

// Net Neutrality
Principle: All internet traffic treated equally
No blocking, throttling, or prioritization
Importance: Fair access, free speech
Concern: ISPs controlling content

// Copyright & Fair Use
Copyright: Creator's exclusive rights
Fair use: Limited use for education
Licensing: Creative Commons, GPL
Attribution: Always credit original creator

// Responsible AI Use
Understand capabilities & limitations
Be critical of AI outputs
Prevent bias in data/algorithms
Transparent about AI usage

More Cheat Sheets