import csv from datetime import date def mark_attendance(student_id): today = date.today().strftime("%Y-%m-%d") with open('attendance.csv', 'a', newline='') as csvfile: writer = csv.writer(csvfile) writer.writerow([today, student_id]) def main(): student_id = input("Enter student ID: ") mark_attendance(student_id) print("Attendance marked successfully.") if __name__ == '__main__': main()
Posts
Automatic attendance using Python
Automatic attendance using Python