![]() |
VOOZH | about |
In many colleges, we have an attendance system for each subject, and the lack of the same leads to problems. It is difficult for students to remember the number of leaves taken for a particular subject. If every time paperwork has to be done to track the number of leaves taken by staff and check whether it is a lack of attendance or not, it involves a lot of time and is inefficient too.
This article will bring a simple tracker & reminder system for attendance. The input to this system is an excel sheet containing the students' mail-id and their number of leaves in each class subject. For say, if a student will not be allowed to write the exam for a particular subject if he takes more than 3 leaves. This tracker will send out an email to the student when he takes the second leave as a reminder that only 1 more left with him on that subject. If he takes further leave, both the student and the corresponding staff receive emails regarding the lack of attendance. The only thing to do is just enter the subject code and roll number of the student absent from the class and the rest will be taken care of by this tracker system.
Install the following modules using pip or conda commands.
The Excel sheet should contain the following data:
For this article, consider three subjects and their codes as numbers for input:
Initially, the Excel sheet should look like this:
👁 ImageIt is advisable to create a separate mail ID for use as the sender, as Google blocks less secure apps from signing in to Gmail. Certain permissions have to be given for sending the mail which is risky to do with a personal mail ID. If you do not give permissions you will end up with "bad credentials" error and will receive an email, as you see in the screenshot below:
👁 ImageTo avoid these issues, follow the steps below:
Now all the prerequisites are ready. A Python script has to be written for tracking. Let us do it step by step.
Example :
If the parameters are [1,1,2,3] , [1,2,3,4] , 1
no_of_days : [1,1,2,3] - total number of leaves till date taken by each student in the next list.
row_num : [1,2,3,4] - roll numbers absent for today.
b: 1 - Subject Code : here Computer Intelligence
The complete implementation following the above approach is given below.
Example: Simple attendance tracker
Output:
1--->CI 2--->python 3--->DM enter subject :1 no.of.absentees :2 roll nos :1 3 saved! saved! another subject ? 1---->yes 0--->no 1 1--->CI 2--->python 3--->DM enter subject :1 no.of.absentees :1 roll no :1 saved! mail sent to students another subject ? 1---->yes 0--->no 1 1--->CI 2--->python 3--->DM enter subject :1 no.of.absentees :1 roll no :1 saved! mail sent to students Mail Sent to staff another subject ? 1---->yes 0--->no 0👁 Image
Points to remember before executing: