program report
program report
REPORT
COMPUTER
SCIENCE
-NAKSH YEDKE
CLASS: XI A
ROLL NO: 31
OBJECTIVE
The aim is to create a Python program that
manages attendance for students in a school. The
code achieves this by de ning two classes:
`Student` and `AttendanceSystem`.
• Attributes:
• Methods:
• Attributes:
Methods:
1. add_student(name, roll_number,
student_class): Adds a new student to the
attendance system.
3. get_student_details(student_name): Retrieves
details of a student including their attendance
record.
Example Usage:
class AttendanceSystem:
def __init__(self):
self.students = {}
self.students[student_name].mark_attendance(date,
status)
else:
print(f"Student {student_name} not found.")
# Example usage:
attendance_system = AttendanceSystem()
self.name
Adding students with Indian names in English
attendance_system.add_student("Alisha")
attendance_system.add_student("Bharat")
attendance_system.add_student("Chandan")
# Marking attendance
attendance_system.mark_attendance("Alisha",
"2024-02-21", "Present")
attendance_system.mark_attendance("Bharat",
"2024-02-21", "Absent")
attendance_system.mark_attendance("Chandan",
"2024-02-21", "Present")
# Getting attendance
print(attendance_system.get_attendance("Alisha"))
print(attendance_system.get_attendance("Bharat"))
print(attendance_system.get_attendance("Chandan"))