0% found this document useful (0 votes)
12 views24 pages

Information Practice ProjectRushda

Uploaded by

Shreyansh Nayak
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)
12 views24 pages

Information Practice ProjectRushda

Uploaded by

Shreyansh Nayak
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
You are on page 1/ 24

Information Practice Project

Student Profile
Name: - Rushda

Class: - XII

Project: -Student Management System

Teacher’s Name: Mr. Rajat Kamal Sharma


CERTIFICATE

This is to certify that Rushda, a student of Class 12, has


successfully completed the project titled
"Student Management System" as part of the Informatics
Practices curriculum for the academic year 2024-2025.
The project has been completed under the guidance of
Mr. Rajat Kamal Sharma, Informatics Practices teacher, and it
reflects the student's hard work, dedication, and understanding
of the subject.

We wish the student success in all their future endeavour.

Internal Examiner’s Signature

External Examiner’s Signature

Principal’s Signature
INDEX

➢Acknowledgement
➢Introduction
o Objective
o Key features
o Benefits
➢Source code
➢Output
o Main Login Menu
o User Dashboard
o Admin Dashboard
o Adding New Column
o Add New Student Record
o Display all the Records
o Delete Student Record
o Export to csv
o Graphical analysis (Hobby vs Percentage)
➢Bibliography
ACKNOWLEDGEMENT

I would like to express my heartfelt gratitude to Mr. Rajat Kamal


Sharma, my Informatics Practices teacher, for his invaluable
guidance, encouragement, and support throughout the
preparation of this project on the topic "Student Management
System". His expertise and patience have been instrumental in
helping me understand the concepts and successfully complete
this project.

I am also thankful for the resources and insights he provided,


which greatly contributed to my learning experience.

Lastly, I extend my appreciation to my school and family for their


constant support and motivation throughout the process.

Sincerely,
Rushda
Class 12
Introduction

A Student Management System (SMS) is a software application de


signed to help educational institutions manage and streamline var
ious administrative and academic tasks related to students. Here’s
a brief overview of its key features and benefits:
Key Features
1. Student Enrollment: Manages the admission process, trackin
g applications, and student records.
2. Attendance Tracking: Monitors student attendance and gene
rates reports for absences and tardiness.
3. Grade Management: Records student grades, calculates GPA,
and generates transcripts.
4. Timetable Management: Organizes class schedules, exam ti
metables, and room allocations.
5. Communication Tools: Facilitates communication between te
achers, students, and parents through notifications and mess
ages.
6. Fee Management: Handles billing, payment tracking, and fin
ancial records.
7. Library Management: Manages library resources, book lendi
ng, and inventory.
8. Reports and Analytics: Generates various reports and insight
s to help in decision-
making and improving academic performance.
Benefits
• Efficiency: Automates repetitive tasks, reducing the administr
ative workload for staff.
• Accuracy: Minimizes errors in student records and grading.
• Accessibility: Provides students, parents, and staff with easy
access to important information through online portals.
• Communication: Enhances communication and collaboration
among stakeholders.
• Data_Driven Decisions: Offers insights and analytics to impro
ve educational outcomes and institutional performance
Source Code
import sqlite3
import pandas as pd
import matplotlib.pyplot as plt

def initialize_db():
"""Initialize the SQLite database and create the table if it
doesn't exist."""
conn = sqlite3.connect("student_records.db")
cursor = conn.cursor()
# Create the 'students' table if it does not already exist
cursor.execute('''CREATE TABLE IF NOT EXISTS students (
Roll_No INTEGER PRIMARY KEY,
Name TEXT,
Hobby TEXT,
Address TEXT,
Gender TEXT,
Percentage REAL,
Age INTEGER,
Weight REAL)''')
conn.commit()
conn.close()

def fetch_all_records():
"""Fetch all records from the database into a DataFrame."""
conn = sqlite3.connect("student_records.db")
# Use pandas to read SQL query results into a DataFrame
df = pd.read_sql_query("SELECT * FROM students", conn,
index_col="Roll_No")
conn.close()
return df

def execute_query(query, params=()):


"""Execute a query on the database."""
conn = sqlite3.connect("student_records.db")
cursor = conn.cursor()
cursor.execute(query, params) # Execute SQL query with
optional parameters
conn.commit()
conn.close()
def add_column():
"""Add a new column to the database table."""
col = input("Enter the name of the new column: ")
col_type = input("Enter the data type (TEXT, INTEGER, REAL): ")
query = f"ALTER TABLE students ADD COLUMN {col} {col_type}"
try:
execute_query(query)
print(f"Column '{col}' added successfully!")
except sqlite3.OperationalError as e:
print(f"Error: {e}")

def delete_column():
"""Inform the user that SQLite does not support dropping
columns."""
print("SQLite does not support deleting columns directly. You
may need to create a new table.")

def rename_column():
"""Rename a column in the database table."""
print("SQLite does not support renaming columns directly.")
def add_student():
"""Add a new student's record."""
# Prompt user for all student details
roll_no = int(input("Enter roll number: "))
name = input("Enter name: ")
hobby = input("Enter hobby: ")
address = input("Enter address: ")
gender = input("Enter gender (M/F): ")
percentage = float(input("Enter percentage: "))
age = int(input("Enter age: "))
weight = float(input("Enter weight: "))
# Insert new record into the 'students' table
query = '''INSERT INTO students (Roll_No, Name, Hobby,
Address, Gender, Percentage, Age, Weight)
VALUES (?, ?, ?, ?, ?, ?, ?, ?)'''
execute_query(query, (roll_no, name, hobby, address, gender,
percentage, age, weight))
print("Student record added successfully!")

def delete_student():
"""Delete a student's record by roll number."""
roll_no = int(input("Enter roll number to delete: "))
query = "DELETE FROM students WHERE Roll_No = ?"
execute_query(query, (roll_no,))
print("Student record deleted successfully!")

def display_students():
"""Display all student records."""
df = fetch_all_records()
print("\nStudent Records:\n")
print(df.to_markdown()) # Display DataFrame in a tabular
format

def sort_students():
"""Sort student records by a specified column."""
df = fetch_all_records()
print("Columns: ", df.columns.tolist())
col = input("Enter column to sort by: ")
if col in df.columns:
order = input("Ascending or Descending? (A/D):
").strip().upper()
ascending = order == 'A'
# Display the sorted DataFrame
print(df.sort_values(by=col,
ascending=ascending).to_markdown())
else:
print("No such column exists.")

def graphical_analysis():
"""Display graphical analysis of hobby vs percentage."""
df = fetch_all_records()
if 'Hobby' in df.columns and 'Percentage' in df.columns:
# Group data by 'Hobby' and calculate the average
percentage
grouped = df.groupby('Hobby')['Percentage'].mean()
# Plot a bar chart of hobbies vs average percentage
grouped.plot(kind='bar', title='Hobby vs Average Percentage')
plt.xlabel('Hobby')
plt.ylabel('Average Percentage')
plt.show()
else:
print("Columns 'Hobby' and 'Percentage' are required for this
analysis.")

def export_to_csv():
"""Export all student records to a CSV file."""
df = fetch_all_records()
filename = input("Enter the filename to export (e.g.,
students.csv): ")
try:
# Save DataFrame to a CSV file
df.to_csv(filename)
print(f"Records successfully exported to {filename}.")
except Exception as e:
print(f"Error exporting records: {e}")

def admin_panel():
"""Admin functionalities."""
while True:
print("\nAdmin Panel:")
print("1. Add a new column")
print("2. Delete a column")
print("3. Rename a column")
print("4. Add a new student record")
print("5. Delete a student record")
print("6. Display all records")
print("7. Sort records by a column")
print("8. Graphical analysis (Hobby vs Percentage)")
print("9. Export records to CSV")
print("10. Exit")

choice = int(input("Enter your choice: "))

if choice == 1:
add_column()
elif choice == 2:
delete_column()
elif choice == 3:
rename_column()
elif choice == 4:
add_student()
elif choice == 5:
delete_student()
elif choice == 6:
display_students()
elif choice == 7:
sort_students()
elif choice == 8:
graphical_analysis()
elif choice == 9:
export_to_csv()
elif choice == 10:
print("Exiting Admin Panel.")
break
else:
print("Invalid choice. Try again.")

def user_panel():
"""User functionalities."""
while True:
print("\nUser Panel:")
print("1. Display all records")
print("2. Display records sorted by a column")
print("3. Graphical analysis (Hobby vs Percentage)")
print("4. Exit")

choice = int(input("Enter your choice: "))

if choice == 1:
display_students()
elif choice == 2:
sort_students()
elif choice == 3:
graphical_analysis()
elif choice == 4:
print("Exiting User Panel.")
break
else:
print("Invalid choice. Try again.")

def main():
"""Main function to run the program."""
initialize_db() # Initialize the database on startup
admin_password = "@aryankushwaha" # Hardcoded admin
password
print("\nWelcome to Student Record Management System")

while True:
print("\nLogin as:")
print("1. Admin")
print("2. User")
print("3. Exit")
choice = int(input("Enter your choice: "))

if choice == 1:
# Prompt for admin password
password = input("Enter Admin Password: ")
if password == admin_password:
admin_panel()
else:
print("Incorrect password.")
elif choice == 2:
user_panel()
elif choice == 3:
print("Exiting system. Goodbye!")
break
else:
print("Invalid choice. Try again.")

if __name__ == "__main__":
main()
Output

Main Login Menu:

User Panel :

Admin Panel:
Adding New Column

Add a New Student Record


Add New student Record

Lets Display all the records:


Delete Student Record

Export records to CSV:


CSV File:

Graphical analysis (Hobby vs Percentage):


Bibliography
➢Sumitha Arora Class 11 Textbook
➢Sumitha Arora Class 12 Textbook
➢https://iq.opengenus.org/ t-system/

You might also like