Professional Documents
Culture Documents
PROJECT ON
TEACHER’S ASSISTANT
SUBMITTED TO : SUBMITTED BY :
Mr.Sathasivan H Name : Pranav.N
Reg No. : 2923
Class : 12-AN1
1. Certificate
2. Acknowledgement
3. Introduction
4. Objectives
5. Scope
7. Description
8. Future Scope
9. Drawbacks
10. Coding
11. Outputs
12. Conclusion
13. Bibliography
Teacher’s Signature
CERTIFICATE
This is to certify that Mr. Pranav N, Roll No. 20219324 of class XII (Session 2022-23),
Suguna Pip School has completed the project based on the topic “Teacher’s Assistant” as a part
of the paper of Computer Science (083).
It is a bona-fide piece of work done under my supervision and guidance to the best of my
knowledge. It is the original work of the candidate and is a result of her/his effort in partial
fulfillment of requirement as per AISSCE curriculum of class XII.
EXTERNAL
I would like to thank Mr. POOVANNAN, Principal, Coimbatore for his immeasurable
direction towards course of action and support throughout the project.
I would also like to thank my Faculty Guide, Mr.SATHASIVAN, for her/his valuable
mentoring throughout the project. The interesting lectures of my knowledgeable teacher has helped
me understand the various concepts related to Teacher’s Assitant and see their presence in the actual
world.
Thanks to my parents, friends and everyone else who have been directly or indirectly
supportive during the course of my project.
Date of Submission :
Introduction
The objective of this project is to conduct research and create a program designed
to alleviate the challenges encountered by educational institutions in the effective
management and updating of teacher timetables. By addressing this aspect, the
project seeks to contribute to the overall organizational efficiency of educational
institutions. The program aims to streamline the process of timetable creation,
modification, and organization, providing a comprehensive solution that optimizes
time management and enhances the operational effectiveness of educational
establishments.
Scope
Hardware Requirements:
Software Requirements:
1. Operating System:
-Windows 10, macOS, or Linux for broad compatibility.
2. Python:
-Python 3.7 or later installed to execute the Python script.
-Download Python from the official website: [Python
Downloads](https://www.python.org/downloads/).
3. MySQL Database:
-MySQL Server installed and running.
-MySQL Connector/Python library for Python to connect to the MySQL
database. Install it using:
```
pip install mysql-connector-python
```
4. CSV Module:
-Built-in CSV module in Python for handling timetable data.
The Python script comprises functions for managing attendance, marks, and
timetables in an educational setting. It utilizes MySQL for data storage, provides a
user-friendly interface, and includes features for recording, updating, and deleting
student attendance and marks. The code ensures efficient organizational
effectiveness for educators through streamlined administrative processes.
1. `attendance()` Function:
- Purpose: Manages attendance-related operations.
- Steps:
1. Connects to a MySQL database and creates an "attendance" table if not
exists.
2. Defines functions for taking attendance, updating attendance, and deleting
attendance.
3. Allows the user to choose between these operations based on input.
4. Closes the database connection after the chosen operation.
2. `take_attendance()` Function:
- Purpose: Takes input for student name, attendance status, and class date, inserts
the data into the "attendance" table, and commits the changes to the database.
3. `update_attendance()` Function:
- Purpose: Takes input to update attendance for a specific student, class date, and
status. Updates the "attendance" table accordingly and commits changes to the
database.
4. `delete_attendance()` Function:
- Purpose: Takes input to delete attendance records for a specific student and
class date. Deletes the records from the "attendance" table and commits the
changes to the database.
5. `timetable()` Function:
- Purpose: Manages timetable-related operations.
- Steps:
1. Defines functions for creating, updating, and deleting timetables.
2. Allows the user to choose between these operations based on input.
3. Closes the database connection after the chosen operation.
6. `create_timetable()` Function:
- Purpose: Takes input for a teacher's name and generates a timetable for each
weekday and period. Writes the timetable data to a CSV file.
7. `update_timetable()` Function:
- Purpose: Takes input to update a teacher's timetable for a specific day and
period. Reads the existing timetable from a CSV file, updates the data, and writes
it back to the file.
8. `delete_timetable()` Function:
- Purpose: Takes input to delete a teacher's timetable. Removes the corresponding
CSV file if it exists.
9. `marks()` Function:
- Purpose: Manages student marks-related operations.
- Steps:
1. Connects to a MySQL database and creates a "student_marks" table if not
exists.
2. Defines functions for storing, updating, and deleting student marks.
3. Allows the user to choose between these operations based on input.
4. Closes the database connection after the chosen operation.
The future scope of the code envisions a comprehensive evolution into an advanced
educational management system. Key areas for expansion include implementing
user authentication for enhanced security, developing a graphical user interface
(GUI) to improve user experience, and integrating email notifications to keep
stakeholders informed. Additionally, exploring machine learning for predictive
analysis, mobile application development, and integration with Learning
Management Systems (LMS) will empower educators with data-driven insights
and convenient access. Automated report generation, multi-tenant support, and
enhanced security measures will contribute to the code's scalability and
effectiveness, while cloud integration ensures broader accessibility and data
management capabilities. Overall, the future holds immense potential for the code
to become a versatile and sophisticated tool, catering to the evolving needs of
educational institutions globally.
Drawbacks
The code exhibits certain drawbacks that warrant consideration. Notably, it may
lack comprehensive error-handling mechanisms, potentially leading to unexpected
behavior. The reliance on a CSV file for timetable management could pose
scalability challenges and limit flexibility as the educational institution grows.
Security concerns arise regarding the handling of sensitive data, necessitating
additional measures for protection. The absence of a graphical user interface limits
accessibility, potentially hindering user adoption. Furthermore, the code lacks a
detailed suite of unit tests, making it challenging to ensure reliability and
correctness in various scenarios. To enhance the code's robustness, scalability, and
user-friendliness, addressing these drawbacks through improved error handling,
security measures, and scalability considerations is recommended.
Coding
import mysql.connector
import csv
import os
def attendance():
conn = mysql.connector.connect(host="localhost",user="root",password="root",database="project")
cursor = conn.cursor()
create_table_query = "CREATE TABLE IF NOT EXISTS attendance (id INT AUTO_INCREMENT PRIMARY KEY, student_name
VARCHAR(255) NOT NULL, status VARCHAR(10) NOT NULL, class_date DATE NOT NULL)"
cursor.execute(create_table_query)
def take_attendance():
student_name = input("Enter student name: ")
status = input("Enter attendance status (Present/Absent): ")
class_date = input("Enter class date (YYYY-MM-DD): ")
insert_query = "INSERT INTO attendance (student_name, status, class_date) VALUES (%s, %s, %s)"
data = (student_name, status, class_date)
cursor.execute(insert_query, data)
conn.commit()
print("Attendance recorded successfully!")
def update_attendance():
student_name = input("Enter student name to update attendance: ")
new_status = input("Enter new attendance status (Present/Absent): ")
class_date = input("Enter class date to update (YYYY-MM-DD): ")
update_query = "UPDATE attendance SET status = %s WHERE student_name = %s AND class_date = %s"
data = (new_status, student_name, class_date)
cursor.execute(update_query, data)
conn.commit()
print("Attendance updated successfully!")
def delete_attendance():
student_name = input("Enter student name to delete attendance: ")
class_date = input("Enter class date to delete (YYYY-MM-DD): ")
choice = input("Choose operation (1: Take Attendance, 2: Update Attendance, 3: Delete Attendance): ")
if choice == "1":
num_students = int(input("Enter the number of students: "))
for _ in range(num_students):
take_attendance()
elif choice == "2":
update_attendance()
elif choice == "3":
delete_attendance()
else:
print("Invalid choice. Please choose 1, 2, or 3.")
cursor.close()
conn.close()
def timetable():
def create_timetable():
teacher_name = input("Enter teacher's name: ")
filename = f"{teacher_name}.csv"
try:
with open(filename, 'w', newline='') as csvfile:
writer = csv.writer(csvfile)
writer.writerows(timetable)
import csv
def update_timetable():
teacher_name = input("Enter teacher's name to update timetable: ")
day = input("Enter day to update timetable: ")
period = int(input("Enter period to update: "))
new_subject = input("Enter new class for the period: ")
filename = f"{teacher_name}.csv"
try:
with open(filename, 'r', newline='') as csvfile:
reader = csv.reader(csvfile)
timetable = list(reader)
except FileNotFoundError:
print(f"Error: {filename} not found. Please create the timetable first.")
return
day_index = None
for i, row in enumerate(timetable):
if row and row[0] == day:
day_index = i
break
try:
with open(filename, 'w', newline='') as csvfile:
writer = csv.writer(csvfile)
writer.writerows(timetable)
def delete_timetable():
teacher_name = input("Enter teacher's name to delete timetable: ")
filename = f"{teacher_name}.csv"
try:
os.remove(filename)
print(f"Timetable for {teacher_name} has been deleted.")
except FileNotFoundError:
print(f"Timetable file for {teacher_name} not found.")
choice = input("Choose operation (1: View Timetable, 2: Update Timetable, 3: Delete Timetable): ")
if choice == "1":
create_timetable()
elif choice == "2":
update_timetable()
elif choice == "3":
delete_timetable()
else:
print("Invalid choice. Please choose 1, 2, or 3.")
def marks():
conn = mysql.connector.connect(host="localhost",user="root",password="root",database="project")
cursor = conn.cursor()
create_table_query = "CREATE TABLE IF NOT EXISTS student_marks ( id INT AUTO_INCREMENT PRIMARY
KEY,student_name VARCHAR(255) NOT NULL,subject VARCHAR(255) NOT NULL,marks INT NOT NULL)"
cursor.execute(create_table_query)
def store_marks():
student_name = input("Enter student name: ")
subject = input("Enter subject: ")
marks = int(input("Enter marks: "))
insert_query = "INSERT INTO student_marks (student_name, subject, marks) VALUES (%s, %s, %s)"
data = (student_name, subject, marks)
cursor.execute(insert_query, data)
conn.commit()
print("Marks recorded successfully!")
def update_marks():
student_name = input("Enter student name to update marks: ")
subject = input("Enter subject to update: ")
new_marks = int(input("Enter new marks: "))
update_query = "UPDATE student_marks SET marks = %s WHERE student_name = %s AND subject = %s"
data = (new_marks, student_name, subject)
cursor.execute(update_query, data)
conn.commit()
print("Marks updated successfully!")
def delete_marks():
student_name = input("Enter student name to delete marks: ")
subject = input("Enter subject to delete: ")
print('-' 33)
print("Welocme to teacher assistant app!")
print('-' 33)
print("What operation do you want to perform?\n 1.Attendance\n 2.Marks\n 3.Timetable\n")
opt = int(input("Your choice:"))
if opt == 1:
attendance()
elif opt == 2:
marks()
elif opt == 3:
timetable()
else:
print("Invalid option.")
Outputs
ATTENDANCE INPUT:
UPDATING ATTENDANCE:
DELETING ATTENDANCE:
MARKS INPUT:
UPDATING MARKS:
DELETING MARKS:
TIMETABLE INPUT:
UPDATING TIMETABLE:
DELETING TIMETABLE:
HARRISH.CSV FILE:
Conclusion
1.https://www.w3schools.com/
2.https://www.github.com/