0% found this document useful (0 votes)
5 views21 pages

Computer Project File For Class 12 (New)

A 12th computer science project file on these topics from taking data from web search just to write and i am in cbsc board •Minimum 15 Python programs. •SQL Queries – Minimum 5 sets using one table / two tables. •Minimum 4 programs based on Python – SQL connectivity
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views21 pages

Computer Project File For Class 12 (New)

A 12th computer science project file on these topics from taking data from web search just to write and i am in cbsc board •Minimum 15 Python programs. •SQL Queries – Minimum 5 sets using one table / two tables. •Minimum 4 programs based on Python – SQL connectivity
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CBSE CLASS 12 COMPUTER SCIENCE

PROJECT FILE
Name: Anukalp
Session: 2024-25
(Minimum 15 Python Programs + 5 SQL Query Sets + 4 Python-
SQL Programs)

TABLE OF CONTENTS
1. Python Programs (15)
2. SQL Queries (5 Sets)
3. Python-SQL Connectivity Programs (4)
4. Project Output Screenshots

PART 1: PYTHON PROGRAMS (15 Programs)


PROGRAM 1: Basic Arithmetic Operations
Objective: Write a program to perform arithmetic operations on two numbers.
print("=== ARITHMETIC OPERATIONS ===")
num1 = int(input("Enter first number: "))
num2 = int(input("Enter second number: "))

print(f"Addition: {num1 + num2}")


print(f"Subtraction: {num1 - num2}")
print(f"Multiplication: {num1 * num2}")
print(f"Division: {num1 / num2}")
print(f"Floor Division: {num1 // num2}")
print(f"Modulus: {num1 % num2}")
print(f"Exponentiation: {num1 ** num2}")
Output: Results of basic arithmetic operations displayed.

PROGRAM 2: Check Prime Number


Objective: Determine if a number is prime or not.
def is_prime(num):
if num < 2:

1
return False
for i in range(2, int(num**0.5) + 1):
if num % i == 0:
return False
return True

num = int(input("Enter a number: "))


if is_prime(num):
print(f"{num} is a Prime Number")
else:
print(f"{num} is Not a Prime Number")
Output: Prime or Not Prime message displayed.

PROGRAM 3: Check Palindrome String


Objective: Check if a string is palindrome or not.
def is_palindrome(s):
s = s.replace(" ", "").lower()
return s == s[::-1]

string = input("Enter a string: ")


if is_palindrome(string):
print(f"'{string}' is a Palindrome")
else:
print(f"'{string}' is Not a Palindrome")
Output: Palindrome or Not Palindrome message.

PROGRAM 4: Check Armstrong Number


Objective: Verify if a number is Armstrong number.
def is_armstrong(num):
digits = len(str(num))
sum_powers = sum(int(digit) ** digits for digit in str(num))
return sum_powers == num

num = int(input("Enter a number: "))


if is_armstrong(num):
print(f"{num} is an Armstrong Number")
else:
print(f"{num} is Not an Armstrong Number")

2
Output: Armstrong or Not Armstrong message.

PROGRAM 5: Find Factorial Using Recursion


Objective: Calculate factorial of a number using recursion.
def factorial(n):
if n == 0 or n == 1:
return 1
else:
return n * factorial(n - 1)

num = int(input("Enter a number: "))


if num < 0:
print("Factorial is not defined for negative numbers")
else:
print(f"Factorial of {num} is {factorial(num)}")
Output: Factorial of the entered number displayed.

PROGRAM 6: Fibonacci Series


Objective: Generate Fibonacci series up to n terms.
def fibonacci(n):
a, b = 0, 1
for _ in range(n):
print(a, end=" ")
a, b = b, a + b

n = int(input("Enter number of terms: "))


print(f"Fibonacci series of {n} terms:")
fibonacci(n)
print()
Output: Fibonacci series printed up to n terms.

PROGRAM 7: String Functions - Replace Vowels


Objective: Replace all vowels in a string with ’*’.
def replace_vowels(string):
vowels = "aeiouAEIOU"
result = ""

3
for char in string:
if char in vowels:
result += "*"
else:
result += char
return result

string = input("Enter a string: ")


print(f"Original String: {string}")
print(f"Modified String: {replace_vowels(string)}")
Output: Original and modified strings displayed.

PROGRAM 8: List Operations


Objective: Perform various operations on a list.
print("=== LIST OPERATIONS ===")
numbers = [int(x) for x in input("Enter numbers separated by spaces: ").split()]

print(f"List: {numbers}")
print(f"Sum: {sum(numbers)}")
print(f"Average: {sum(numbers) / len(numbers):.2f}")
print(f"Maximum: {max(numbers)}")
print(f"Minimum: {min(numbers)}")
print(f"Sorted (Ascending): {sorted(numbers)}")
print(f"Sorted (Descending): {sorted(numbers, reverse=True)}")
print(f"Reverse: {numbers[::-1]}")
Output: All list operations results displayed.

PROGRAM 9: Dictionary Operations - Student Details


Objective: Store and display student details using dictionary.
def display_student_info():
students = {}
n = int(input("Enter number of students: "))

for i in range(n):
roll_no = input(f"Enter roll number for student {i+1}: ")
name = input(f"Enter name for student {i+1}: ")
marks = float(input(f"Enter marks for student {i+1}: "))
students[roll_no] = {"Name": name, "Marks": marks}

4
print("\n=== STUDENT RECORDS ===")
for roll_no, info in students.items():
print(f"Roll No: {roll_no}, Name: {info['Name']}, Marks: {info['Marks']}")

display_student_info()
Output: All student records displayed in formatted manner.

PROGRAM 10: File Handling - Write and Read


Objective: Write data to a file and read it back.
# Writing to file
filename = input("Enter filename: ")
with open(filename, 'w') as f:
n = int(input("Enter number of lines: "))
for i in range(n):
line = input(f"Enter line {i+1}: ")
f.write(line + "\n")

# Reading from file


print("\n=== FILE CONTENT ===")
with open(filename, 'r') as f:
content = f.read()
print(content)

# Counting lines and words


print("\n=== FILE STATISTICS ===")
with open(filename, 'r') as f:
lines = f.readlines()
word_count = sum(len(line.split()) for line in lines)
print(f"Number of lines: {len(lines)}")
print(f"Number of words: {word_count}")
Output: File operations performed with statistics displayed.

PROGRAM 11: Linear Search


Objective: Implement linear search algorithm.
def linear_search(arr, target):
for i in range(len(arr)):
if arr[i] == target:
return i
return -1

5
numbers = [int(x) for x in input("Enter numbers separated by spaces: ").split()]
target = int(input("Enter number to search: "))

index = linear_search(numbers, target)


if index != -1:
print(f"Element found at index {index}")
else:
print("Element not found")
Output: Index of found element or not found message.

PROGRAM 12: Binary Search


Objective: Implement binary search algorithm.
def binary_search(arr, target):
low, high = 0, len(arr) - 1
while low <= high:
mid = (low + high) // 2
if arr[mid] == target:
return mid
elif arr[mid] < target:
low = mid + 1
else:
high = mid - 1
return -1

numbers = sorted([int(x) for x in input("Enter numbers separated by spaces: ").split()])


target = int(input("Enter number to search: "))

print(f"Sorted array: {numbers}")


index = binary_search(numbers, target)
if index != -1:
print(f"Element found at index {index}")
else:
print("Element not found")
Output: Binary search result displayed with sorted array.

PROGRAM 13: Bubble Sort


Objective: Implement bubble sort algorithm.

6
def bubble_sort(arr):
n = len(arr)
for i in range(n):
for j in range(n - i - 1):
if arr[j] > arr[j + 1]:
arr[j], arr[j + 1] = arr[j + 1], arr[j]
return arr

numbers = [int(x) for x in input("Enter numbers separated by spaces: ").split()]


print(f"Original array: {numbers}")
sorted_arr = bubble_sort(numbers.copy())
print(f"Sorted array: {sorted_arr}")
Output: Original and sorted arrays displayed.

PROGRAM 14: Stack Implementation


Objective: Implement stack data structure with push and pop operations.
class Stack:
def __init__(self):
self.items = []

def push(self, item):


self.items.append(item)

def pop(self):
if not self.is_empty():
return self.items.pop()
return None

def is_empty(self):
return len(self.items) == 0

def display(self):
print(f"Stack: {self.items}")

stack = Stack()
print("=== STACK OPERATIONS ===")
stack.push(10)
stack.push(20)
stack.push(30)
stack.display()
print(f"Popped: {stack.pop()}")
stack.display()

7
Output: Stack operations with display after each operation.

PROGRAM 15: Queue Implementation


Objective: Implement queue data structure with enqueue and dequeue opera-
tions.
class Queue:
def __init__(self):
self.items = []

def enqueue(self, item):


self.items.append(item)

def dequeue(self):
if not self.is_empty():
return self.items.pop(0)
return None

def is_empty(self):
return len(self.items) == 0

def display(self):
print(f"Queue: {self.items}")

queue = Queue()
print("=== QUEUE OPERATIONS ===")
queue.enqueue(10)
queue.enqueue(20)
queue.enqueue(30)
queue.display()
print(f"Dequeued: {queue.dequeue()}")
queue.display()
Output: Queue operations with display after each operation.

8
PART 2: SQL QUERIES (Minimum 5 Sets)
SQL SET 1: Basic SELECT, INSERT, UPDATE, DELETE
Operations
Create Student Table
CREATE TABLE STUDENT (
Roll_No INT PRIMARY KEY,
Name VARCHAR(30) NOT NULL,
Gender VARCHAR(10),
Marks INT,
Stream VARCHAR(20)
);

Insert Records
INSERT INTO STUDENT VALUES (1, 'Anukalp', 'M', 95, 'Science');
INSERT INTO STUDENT VALUES (2, 'Priya', 'F', 88, 'Commerce');
INSERT INTO STUDENT VALUES (3, 'Rahul', 'M', 92, 'Science');
INSERT INTO STUDENT VALUES (4, 'Neha', 'F', 85, 'Arts');
INSERT INTO STUDENT VALUES (5, 'Arjun', 'M', 90, 'Commerce');

Query 1: Display all records


SELECT * FROM STUDENT;

Query 2: Update marks


UPDATE STUDENT SET Marks = 96 WHERE Roll_No = 1;

Query 3: Display specific columns


SELECT Roll_No, Name, Marks FROM STUDENT;

Query 4: Delete a record


DELETE FROM STUDENT WHERE Roll_No = 4;

Query 5: Order by marks (Descending)


SELECT * FROM STUDENT ORDER BY Marks DESC;

9
SQL SET 2: Single Table Aggregate Functions
Create Product Table
CREATE TABLE PRODUCT (
PID INT PRIMARY KEY,
PName VARCHAR(50),
Price INT,
Category VARCHAR(30),
Quantity INT
);

Insert Records
INSERT INTO PRODUCT VALUES (101, 'Laptop', 50000, 'Electronics', 15);
INSERT INTO PRODUCT VALUES (102, 'Mouse', 500, 'Electronics', 50);
INSERT INTO PRODUCT VALUES (103, 'Keyboard', 2000, 'Electronics', 30);
INSERT INTO PRODUCT VALUES (104, 'Monitor', 15000, 'Electronics', 10);
INSERT INTO PRODUCT VALUES (105, 'Printer', 10000, 'Electronics', 5);

Query 1: Count total products


SELECT COUNT(*) AS Total_Products FROM PRODUCT;

Query 2: Average price


SELECT AVG(Price) AS Average_Price FROM PRODUCT;

Query 3: Maximum and minimum price


SELECT MAX(Price) AS Maximum_Price, MIN(Price) AS Minimum_Price FROM PRODUCT;

Query 4: Sum of total quantities


SELECT SUM(Quantity) AS Total_Quantity FROM PRODUCT;

Query 5: Total inventory value


SELECT SUM(Price * Quantity) AS Total_Inventory_Value FROM PRODUCT;

SQL SET 3: GROUP BY and HAVING Clause


Create Sales Table
CREATE TABLE SALES (
SaleID INT PRIMARY KEY,
Employee VARCHAR(30),

10
Amount INT,
Month VARCHAR(20),
Department VARCHAR(30)
);

Insert Records
INSERT INTO SALES VALUES (1, 'Anil', 5000, 'January', 'Sales');
INSERT INTO SALES VALUES (2, 'Bhavna', 6000, 'January', 'Marketing');
INSERT INTO SALES VALUES (3, 'Anil', 7000, 'February', 'Sales');
INSERT INTO SALES VALUES (4, 'Chetan', 5500, 'February', 'Sales');
INSERT INTO SALES VALUES (5, 'Bhavna', 6500, 'March', 'Marketing');
INSERT INTO SALES VALUES (6, 'Anil', 8000, 'March', 'Sales');

Query 1: Total sales by employee


SELECT Employee, SUM(Amount) AS Total_Sales FROM SALES GROUP BY Employee;

Query 2: Average sales per department


SELECT Department, AVG(Amount) AS Avg_Sales FROM SALES GROUP BY Department;

Query 3: Employee sales greater than 5500


SELECT Employee, SUM(Amount) AS Total FROM SALES GROUP BY Employee HAVING SUM(Amount) > 5500

Query 4: Department with maximum total sales


SELECT Department, SUM(Amount) AS Total_Sales FROM SALES GROUP BY Department ORDER BY Total_

Query 5: Count of transactions per month


SELECT Month, COUNT(*) AS Transaction_Count FROM SALES GROUP BY Month;

SQL SET 4: Two Table JOIN Operations


Create Employee and Department Tables
CREATE TABLE EMPLOYEE (
EID INT PRIMARY KEY,
EName VARCHAR(30),
DID INT,
Salary INT
);

CREATE TABLE DEPARTMENT (

11
DID INT PRIMARY KEY,
DName VARCHAR(30),
Location VARCHAR(30)
);

Insert Records
INSERT INTO EMPLOYEE VALUES (1, 'Anukalp', 1, 50000);
INSERT INTO EMPLOYEE VALUES (2, 'Priya', 2, 45000);
INSERT INTO EMPLOYEE VALUES (3, 'Rahul', 1, 55000);
INSERT INTO EMPLOYEE VALUES (4, 'Neha', 3, 40000);
INSERT INTO EMPLOYEE VALUES (5, 'Arjun', 2, 48000);

INSERT INTO DEPARTMENT VALUES (1, 'IT', 'Delhi');


INSERT INTO DEPARTMENT VALUES (2, 'HR', 'Mumbai');
INSERT INTO DEPARTMENT VALUES (3, 'Finance', 'Bangalore');

Query 1: INNER JOIN - Employee and Department details


SELECT EMPLOYEE.EName, EMPLOYEE.Salary, DEPARTMENT.DName, DEPARTMENT.Location
FROM EMPLOYEE INNER JOIN DEPARTMENT ON EMPLOYEE.DID = DEPARTMENT.DID;

Query 2: Display employees with salary > 45000


SELECT EMPLOYEE.EName, EMPLOYEE.Salary, DEPARTMENT.DName
FROM EMPLOYEE INNER JOIN DEPARTMENT ON EMPLOYEE.DID = DEPARTMENT.DID
WHERE EMPLOYEE.Salary > 45000;

Query 3: LEFT JOIN - All employees with department info


SELECT EMPLOYEE.EName, DEPARTMENT.DName
FROM EMPLOYEE LEFT JOIN DEPARTMENT ON EMPLOYEE.DID = DEPARTMENT.DID;

Query 4: Count employees per department


SELECT DEPARTMENT.DName, COUNT(EMPLOYEE.EID) AS Employee_Count
FROM DEPARTMENT LEFT JOIN EMPLOYEE ON DEPARTMENT.DID = EMPLOYEE.DID
GROUP BY DEPARTMENT.DName;

Query 5: Average salary per department


SELECT DEPARTMENT.DName, AVG(EMPLOYEE.Salary) AS Avg_Salary
FROM EMPLOYEE INNER JOIN DEPARTMENT ON EMPLOYEE.DID = DEPARTMENT.DID
GROUP BY DEPARTMENT.DName;

12
SQL SET 5: Complex Queries with WHERE, ORDER BY,
DISTINCT
Create Order Table
CREATE TABLE ORDERS (
OrderID INT PRIMARY KEY,
CustomerName VARCHAR(30),
Product VARCHAR(30),
OrderDate DATE,
Amount INT
);

Insert Records
INSERT INTO ORDERS VALUES (1, 'Raj', 'Laptop', '2024-01-10', 50000);
INSERT INTO ORDERS VALUES (2, 'Priya', 'Phone', '2024-01-15', 30000);
INSERT INTO ORDERS VALUES (3, 'Raj', 'Tablet', '2024-02-05', 20000);
INSERT INTO ORDERS VALUES (4, 'Neha', 'Phone', '2024-02-10', 30000);
INSERT INTO ORDERS VALUES (5, 'Priya', 'Laptop', '2024-03-01', 50000);
INSERT INTO ORDERS VALUES (6, 'Arjun', 'Phone', '2024-03-15', 30000);

Query 1: Distinct customers


SELECT DISTINCT CustomerName FROM ORDERS;

Query 2: Orders after February 2024


SELECT * FROM ORDERS WHERE OrderDate > '2024-02-01' ORDER BY Amount DESC;

Query 3: Total spending by customer


SELECT CustomerName, SUM(Amount) AS Total_Spending FROM ORDERS GROUP BY CustomerName;

Query 4: Orders for specific product


SELECT * FROM ORDERS WHERE Product = 'Phone' ORDER BY OrderDate DESC;

Query 5: High-value orders (Amount > 25000)


SELECT * FROM ORDERS WHERE Amount > 25000 ORDER BY OrderDate;

13
PART 3: PYTHON-SQL CONNECTIVITY
PROGRAMS (4 Programs)
PROGRAM 1: Database Connection and Display All
Records
import mysql.connector

# Establish connection
mydb = mysql.connector.connect(
host="localhost",
user="root",
password="password",
database="school"
)

if mydb.is_connected():
print("Database Connection Successful!")

cursor = mydb.cursor()

# Create table
create_table = """
CREATE TABLE IF NOT EXISTS STUDENTS (
Roll_No INT PRIMARY KEY,
Name VARCHAR(30),
Marks INT,
Stream VARCHAR(20)
)
"""
cursor.execute(create_table)

# Display all records


cursor.execute("SELECT * FROM STUDENTS")
records = cursor.fetchall()

print("\n=== STUDENT RECORDS ===")


print(f"{'Roll_No':<10} {'Name':<20} {'Marks':<10} {'Stream':<15}")
print("-" * 55)

for record in records:


print(f"{record[0]:<10} {record[1]:<20} {record[2]:<10} {record[3]:<15}")

mydb.close()
else:

14
print("Connection Failed!")
Output: All student records displayed in formatted table.

PROGRAM 2: Insert, Update, and Delete Records


import mysql.connector

mydb = mysql.connector.connect(
host="localhost",
user="root",
password="password",
database="school"
)

cursor = mydb.cursor()

def insert_record():
roll_no = int(input("Enter Roll Number: "))
name = input("Enter Name: ")
marks = int(input("Enter Marks: "))
stream = input("Enter Stream: ")

query = "INSERT INTO STUDENTS VALUES (%s, %s, %s, %s)"


values = (roll_no, name, marks, stream)

cursor.execute(query, values)
mydb.commit()
print("Record Inserted Successfully!")

def update_record():
roll_no = int(input("Enter Roll Number to update: "))
marks = int(input("Enter New Marks: "))

query = "UPDATE STUDENTS SET Marks = %s WHERE Roll_No = %s"


values = (marks, roll_no)

cursor.execute(query, values)
mydb.commit()
print(f"Record {roll_no} Updated Successfully!")

def delete_record():
roll_no = int(input("Enter Roll Number to delete: "))

query = "DELETE FROM STUDENTS WHERE Roll_No = %s"

15
cursor.execute(query, (roll_no,))
mydb.commit()
print(f"Record {roll_no} Deleted Successfully!")

# Main menu
while True:
print("\n=== STUDENT MANAGEMENT SYSTEM ===")
print("1. Insert Record")
print("2. Update Record")
print("3. Delete Record")
print("4. Exit")

choice = input("Enter Choice (1-4): ")

if choice == '1':
insert_record()
elif choice == '2':
update_record()
elif choice == '3':
delete_record()
elif choice == '4':
print("Exiting...")
break
else:
print("Invalid Choice!")

mydb.close()
Output: Menu-driven interface for CRUD operations.

PROGRAM 3: Search and Display Records with Condi-


tions
import mysql.connector

mydb = mysql.connector.connect(
host="localhost",
user="root",
password="password",
database="school"
)

cursor = mydb.cursor()

def search_by_roll_no():

16
roll_no = int(input("Enter Roll Number to search: "))
query = "SELECT * FROM STUDENTS WHERE Roll_No = %s"
cursor.execute(query, (roll_no,))

record = cursor.fetchone()
if record:
print(f"Roll No: {record[0]}, Name: {record[1]}, Marks: {record[2]}, Stream: {record
else:
print("Record not found!")

def search_by_name():
name = input("Enter Name to search: ")
query = "SELECT * FROM STUDENTS WHERE Name LIKE %s"
cursor.execute(query, (f"%{name}%",))

records = cursor.fetchall()
if records:
print("\n=== SEARCH RESULTS ===")
for record in records:
print(f"Roll No: {record[0]}, Name: {record[1]}, Marks: {record[2]}, Stream: {re
else:
print("No records found!")

def search_by_marks_range():
min_marks = int(input("Enter minimum marks: "))
max_marks = int(input("Enter maximum marks: "))

query = "SELECT * FROM STUDENTS WHERE Marks BETWEEN %s AND %s"


cursor.execute(query, (min_marks, max_marks))

records = cursor.fetchall()
if records:
print("\n=== STUDENTS IN MARKS RANGE ===")
for record in records:
print(f"Roll No: {record[0]}, Name: {record[1]}, Marks: {record[2]}, Stream: {re
else:
print("No records found in this range!")

# Main menu
while True:
print("\n=== SEARCH STUDENT ===")
print("1. Search by Roll Number")
print("2. Search by Name")
print("3. Search by Marks Range")
print("4. Exit")

17
choice = input("Enter Choice (1-4): ")

if choice == '1':
search_by_roll_no()
elif choice == '2':
search_by_name()
elif choice == '3':
search_by_marks_range()
elif choice == '4':
print("Exiting...")
break
else:
print("Invalid Choice!")

mydb.close()
Output: Search results displayed based on search criteria.

PROGRAM 4: Generate Reports with Aggregate Func-


tions
import mysql.connector

mydb = mysql.connector.connect(
host="localhost",
user="root",
password="password",
database="school"
)

cursor = mydb.cursor()

def total_students():
cursor.execute("SELECT COUNT(*) FROM STUDENTS")
count = cursor.fetchone()[0]
print(f"Total Students: {count}")

def average_marks():
cursor.execute("SELECT AVG(Marks) FROM STUDENTS")
avg = cursor.fetchone()[0]
print(f"Average Marks: {avg:.2f}")

def highest_marks():
cursor.execute("SELECT MAX(Marks), Name FROM STUDENTS ORDER BY Marks DESC LIMIT 1")
record = cursor.fetchone()

18
if record:
print(f"Highest Marks: {record[0]} (by {record[1]})")

def lowest_marks():
cursor.execute("SELECT MIN(Marks), Name FROM STUDENTS ORDER BY Marks ASC LIMIT 1")
record = cursor.fetchone()
if record:
print(f"Lowest Marks: {record[0]} (by {record[1]})")

def students_by_stream():
cursor.execute("SELECT Stream, COUNT(*) FROM STUDENTS GROUP BY Stream")
records = cursor.fetchall()

print("\n=== STUDENTS BY STREAM ===")


for record in records:
print(f"{record[0]}: {record[1]} students")

def marks_statistics():
print("\n=== MARKS STATISTICS ===")
total_students()
average_marks()
highest_marks()
lowest_marks()
students_by_stream()

def toppers():
cursor.execute("SELECT Name, Marks FROM STUDENTS ORDER BY Marks DESC LIMIT 5")
records = cursor.fetchall()

print("\n=== TOP 5 TOPPERS ===")


for i, record in enumerate(records, 1):
print(f"{i}. {record[0]} - {record[1]} marks")

# Main menu
while True:
print("\n=== REPORT GENERATOR ===")
print("1. Marks Statistics")
print("2. Top 5 Toppers")
print("3. Students by Stream")
print("4. Exit")

choice = input("Enter Choice (1-4): ")

if choice == '1':
marks_statistics()
elif choice == '2':

19
toppers()
elif choice == '3':
students_by_stream()
elif choice == '4':
print("Exiting...")
break
else:
print("Invalid Choice!")

mydb.close()
Output: Statistical reports and analysis of student data.

CONCLUSION
This project file comprehensively covers:
1. 15 Python Programs - Covering fundamental concepts like loops, func-
tions, data structures, file handling, searching, sorting, and object-oriented
programming.
2. 5 SQL Query Sets - Including basic operations, aggregate functions,
GROUP BY with HAVING, JOIN operations, and complex queries with
WHERE and ORDER BY clauses.
3. 4 Python-SQL Connectivity Programs - Demonstrating CRUD oper-
ations, search functionality, and report generation using MySQL connec-
tivity.
All programs follow CBSE Class 12 Computer Science curriculum standards and
are suitable for practical examination.

INSTALLATION REQUIREMENTS
For Python-SQL Connectivity:
pip install mysql-connector-python

MySQL Setup:
1. Install MySQL Server
2. Create database: CREATE DATABASE school;
3. Update connection parameters (host, user, password) in Python programs

20
Project Completed by: Anukalp
Session: 2024-25
Board: CBSE

21

You might also like