0% found this document useful (0 votes)
240 views37 pages

Python Report Card System Project

Uploaded by

krishhu024
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)
240 views37 pages

Python Report Card System Project

Uploaded by

krishhu024
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

KASIDIH HIGH SCHOOL

sakchi,Jamshedpur

REPORT CARD MANAGEMENT SYSTEM


SESSION 2024 - 2025

NAME : RAUNAK YADAV


CLASS : 12 A1
ROLL NO : 33
SUBJECT :COMPUTER SCIENCE
SUBJECT TEACHER : KAMLESH OJHA
CERTIFICATE

This is to certify that Raunak Yadav of class XII-A1 of


science of roll no 33 of Kasidih High School has
successfully completed and submitted the Computer
Science Project. On Report Card Management System To
The Computer Department of AISSCE 2024-25

This project is absolutely genuine and does not indulge any


kind of plagiarism.

The reference taken in making this project has been


declared at the end of this project.
ACKNOWLEDGEMENT

I have given efforts in this project, however it would not have been

possible without the kind support and help of many individuals.

I would like to thank my principal Mr. Francis Joseph and school for

providing me with facilities required to do my project.

I am highly indebted to my Computer Science teacher Mr. Kamlesh Ojha

for his valuable guidance which has sustained my efforts in all stages of

the project.

I would also like to thank my parents for their continuous support and

encouragement.

RAUNAK YADAV

XII A1
INDEX

1. About Python

2. About Student Report Card Maker

3. Hierarchical Diagram of Student Report Card

4. Data required as input

5. Report required as output

6. Classes and their functions

7. Hardware and Software requirement

8. Project Listing

9. Output Screen

10. Reference
ABOUT PYTHON

Python is an interpreted, high-level, general-purpose


programming language. Created by Guido van Rossum
and first released in 1991. Python's design philosophy
emphasizes code readability through use of significant
whitespace. Its language constructs and object-
oriented approach him to help programmers write clear,
logical code for small and large-scale projects.

Python was conceived in the late 1980s as a successor


to the ABC language. Python 2.0, released in 2000,
introduced features like list comprehensions and a
garbage collection system capable of collecting
reference cycles. Python 3.0, released in 2008, was a
major revision of the language that is not completely
backward compatible, and much Python 2 code does
not run unmodified on Python 3. Due to concern about
the amount of code written for Python 2, support for
Python 2.7(the last release in the 2.x series) was
extended to 2020. Language developer Guido van
Rossum shouldered sole responsibility for the until
2018 but now shares his output Required
ABOUT STUDENT REPORT CARD MANAGEMENT

Student report card maker is a simple computer


program designed to help teachers to generate
students report card after every session.

The whole program is designed in this way that you can


expand it up to any level. Initially it is used to feed
students information and marks obtained in five
subjects.

This information is recorded in a binary file "[Link]",


so that this recorded information can be used later on
at any stage.

Modification, deletion, and selection, reporting facility


is given in this project for easy management.

This program is fact and accurate, since it is written in


one of the simplest programming language i.e. Python.
HIEARCHICAL DIAGRAM OF PROJECT
Data Required as Input
Adm no-To store student adm no
Name name of the student
Father's name father's name of the student
Class and section class and section of the student
Session-session
Marks obtained in 5 subject-
Total Marks- Total marks
Percentage percentage marks of the student
Grade Grade of student
Criteria for Grade calculation
Percentage mark
>=95 A+
<95 and >=90 A
<90 and >=80 B+
<80 and >=70 B
<70 and >=60 C+
<60 C
Output Required

 Single student report card

 Class wise student report card

 Search - adm no

 Search - class & section

 Search - name, class and section hardware and Software


Requirement
 Hardware required

 64 MB RAM

 Pentum-1 and Above Processor

 Mouse

 Keyboard
Software required

 Operating System-Windows or any other supported

 Python Compiler

 IDE (Integrated Development environment


PROGRAMLISTING (SOURCECODE)

import csv
class Student:
def_init_(self, name, roll_number, admission_number,
father_name, mother_name, student_class, marks=None,
percentage=0):
[Link] name
self.roll_number = roll_number
self.admission_number = admission_number
self.father_name = father_name
self.mother_name = mother_name
self.student_class = student_class
[Link] marks if marks else ()
[Link] = percentage
def calculate_average(self):
if not [Link]:
return 0
return sum([Link]()) /len([Link])ent)-DEV
[Link] round((total_marks/(total_subjects*
max_marks_per_subject)) * 100, 2)
def display_table(header, data): max_lengths =
[max(len(str(row[i])) for row in data) for i in
range(len(header)}]
header_str = "|".join(f" (header[i]:^{max_lengths[i]}}" for i in
range(len(header))}
print(header_str) print("-" sum(max_lengths + [len(header)-
1]))
for row in data:
row_str="".join(f"[row[i]:^{max_lengths[i]}}" for i in
range(len(row)}}
print(row_str)
def get_valid_marks(subject):
while True:
try:
marks = float(input(f"Enter (subject) marks (0-100): "))
if 0 <= marks <= 100
return marks
else: print("Invalid input. Marks should be in the range of 0 to
100.")Python
except ValueError:
father_name = input("Enter father's name: ")
mother_name = input("Enter mother's name: ")
marks = ()
subjects ["English", "Maths", "Physics", "Chemistry",
"Computer Science")
for subject in subjects:
mark get_valid_marks(subject)
marks[subject] = mark
new_student = Student(name, roll_number,
admission_number, father_name, mother_name,
student_class, marks)
new_student.calculate_percentage()
[Link](new student)
print(f"Student (name) added successfully!")
#Function to delete a student's data

def delete_student():
admission_number = input("Enter student admission number
to delete: ")
for student in students:
print("Invalid input. Please enter a valid number.")
def main():
students = []
#Function to add a new student

def add_student():
name = input("Enter student name: ")
roll_number input("Enter student roll number: ")
admission_number input("Enter student admission number: ")
#Check for unique admission number

if any(student.admission_number == admission_number for


student in students):
print("Admission number already exists for another student.
Please enter a unique admission number.")

return
#Check for unique roll number in the same class
student class= input("Enter student class: ")
if any(student.roll_number = roll_number and
student.student_class = student_class for student in
students):
print("Roll number already exists for another student in the
same class. Please enter a unique roll number.”)
return
father_name = input("Enter father's name: ")
mother_name = input("Enter mother's name: ")
marks = ()
subjects ["English", "Maths", "Physics", "Chemistry",
"Computer Science")
for subject in subjects:
mark get_valid_marks(subject)
marks[subject] = mark
new_student = Student(name, roll_number,
admission_number, father_name, mother_name,
student_class, marks)
new_student.calculate_percentage()
[Link](new student)
print(f"Student (name) added successfully!")
#Function to delete a student's data

def delete_student():
admission_number = input("Enter student admission number
to delete: ")
for student in students:
if students. Admission_number==
admission_number:
[Link](student)
print("Student ([Link]) (Admission Number:
(student.admission_number), Class: (student.student_class))
deleted successfully.")
return
print("Student not found.")
#Function to modify the marks of a student
def modify_marks(): admission_number = input("Enter
student admission number: ") student_class = input("Enter
student class: ")
for student in students:
if student.adrnission_number = admission_number and
student.student_class marks: ") student_class:
subject_to_modify input("Enter the subject to modify marks.”)
if subject_to_modify in [Link]: new_mark =
get_valid_marks(subject_to_modify)
[Link][subject_to__modify] = new_mark
student.calculate_percentage()
print(F” marks for {students .name} in
{subject_to_modify}modified successfully.”)
else:
print(f"[subject_to_modify) not found for ([Link])."
return
print("Student not found.")
#Function to display the report card for a student
def display_report_card():
admission_number = input("Enter student admission number:
")
student_class = input("Enter student class: ")
for student in students: if student admission_number
admission_number and student.student_class =
student_class:
print("\n['KAISIDIH HIGH SCHOOL:*40)")
print(f"('SESSION 2023-24:40)")
print(f"Report Card for ([Link]) (Admission Number:
[student.admission_number), Class: (student.student_class}}")
print(".**40)
report_data
["Roll Number", student.roll_number], ["Father's Name",
student.father_name], ["Mother's Name", student
mother_name].
print(40) #Separating line
report_data.extend([[subject, [Link][subject]] for
subject in [Link]])
report_data.extend([["Average Mark",
student.calculate_average()], ["Percentage",
f"([Link]:.2f}%"]])
header = ["Attribute", "Value"
display_table(header, report_data)
return
print("Student not found.")
#Function to display class-wise average marks for each
subject
def classwise_average_marks(): class_to_display =
input("Enter the class for which you want to display average
marks: ")
subjects = ["English", "Maths", "Physics", "Chemistry",
"Computer Science"]
classwise_marks = (subject: 0 for subject in subjects)
classwise_count = (subject: 0 for subject in subjects)
for student in students:
if student.student_class == class_to_display: for subject,
rnark in [Link]():
classwise_marks[subject] +=mark
classwise_count[subject] += 1
print(f"\nClass-wise Average Marks for Class
(class_to_display):")
classwise_report_data = [[subject,
f"(classwise_marks[subject]/classwise_count[subject]:.2f)"] if
classwise_count[subject] > 0 else (subject, "No data
available"] for
subject in subjects)
header = ["Subject", "Average Mark"]
display_table(header, classwise_report_data)
#Function to display achievers in a class
def display_achievers():
class_to_display = input("Enter the class for which you want
to display achievers: ")
print(f"\n('ACHIEVERS*:^40)")
print("-" * 40)
achievers_data = []
for student in sorted(students, key=lambda x: [Link],
reverse=True):
if student.student_class == class_to_display and
[Link]>90:
achievers_data.append([f" ([Link]) (Admission
Number: (student.admission_number))",
f"([Link]:.2f)%"])
if achievers_data:
header = ["Name (Admission Number)", "Percentage"]
display_table(header, achievers_data)
else:
print("No achievers found in the specified class.")
#Function to display names of students who failed in a class
def display_failed_students(): class_to_display = input("Enter
the class for which you want to display failed students: ")
print("\n('FAILED STUDENTS':*40)")
print("-" 40)
failed_students_data = []
for student in students:
if student.student_class == class_to_display and
[Link] < 33:
failed_students_data.append([[Link]])
if failed students_data:
#FUNCTION TO DISPLAY ACHIEVERS

def display_achievers():
class_to_display = get_non_empty_input("Enter the class for
which you want to display achievers: ")
achievers_data = []
for student in sorted(students, key=lambda x: [Link],
reverse=True):
if student.student_class == class_to_display and
[Link] > 90:
achievers_data.append([Link])
if achievers_data:
print("\nKASIDIH HIGH SCHOOL\nSESSION 2023-
24\nACHIEVERS LIST")
for name in achievers data:
print(name)
with open("[Link]", mode="w", newline="") as file:
writer = [Link](file)
[Link](["Name"])
[Link]([[name] for name in achievers_data])
else:
print("No achievers found in the specified class.")
#FUNCTION TO DISPLAY FAILED STUDENTS

def display_failed_students():
class_to_display = get_non_empty_input("Enter the class for
which you want to display failed students: ")
failed_students_data = []
for student in students:
if student.student_class == class_to_display and
[Link] < 33:
failed_students_data.append([Link])
if failed_students_data:
print("\nKASIDIH HIGH SCHOOL\nSESSION 2023-24\nFAILED
STUDENTS")
for name in failed_students_data:
print(name)
with open("failed_students.csv", mode="w", newline="") as
file:]
writer = [Link](file)
[Link](["Name"])
[Link]([[name] for name in failed_students_data])
else:
print("No students failed in the specified class.")
#Add function to read and display achivers and failed
students from files
def read_csv(file_name):
try:
with open(file_name, mode="r") as file:
reader = [Link](file)
data = list(reader)
return data
except FileNotFoundError:
return []
def display_achievers_from_file():
achievers_data = read_csv("[Link]")
if achievers_data:
header = achievers_data[0]
display_table(header, achievers_data[1:])
else:
print("No achievers data found.")
def display_failed_students_from_file():
failed_students_data = read_csv("failed_students.csv")
if failed_students data:
header = failed_students_data[0]
header = ["Name"]
display_table(header, failed_students_data)
else:
print("No students failed in the specified class.")
while True:
print("\nOptions:")
print("1. Add new student")
print("2. Delete student data")
print("3. Modify student marks")
print("4. Display report card")
print("5. Class-wise Average Marks")
print("6. Display Achievers")
print("7. Display Failed Students")
print("8. Exit")
choice = input("Enter your choice (1/2/3/4/5/6/7/8): ")
if choice == "1":
add_student()
elif choice == "2".
delete_student()
elif choice == "3":
modify_marks()
elif choice == "4":
display_report_card()
elif choice == "S":
classwise_average_marks()
elif choice == "6":
display_achievers()
elif choice == "7":
display_failed_students() elif choice == "8":
break
print("Exiting program. Goodbye!")
else:
print("Invalid choice. Please enter 1, 2, 3, 4, 5, 6, 7, or 8.")
if_name_ == "main": main()
OUTPUT SCREENS

Main Menu

Python 3. 10 6 (taga/v3.10.6:9c7b4bd. Aug 1 2022 [Link])


Type "help". "copyright", "credits or license for more

RESTART: C VUsers Sharin Akhtar townloadsvprojects Vreport

Options

1. Add new student

2 Delete student data 3. Modify student marks

4 Display report card

5 Claso-wise Average Marks

6 Display Achievers

7 Display Failed Students


& Exit

Enter your choice (1/2/3/4/5/6/7/8) 1

Add Student Record

Enter your choice (1/2/3/4/5/6/7/8): 1

Enter student name: raunak kumar

Enter student admission number: 101

Enter student roll number 1

Enter student class: 12 Enter father's name xyx


Enter mother's name abc

Enter English marks (0-100): 67

Enter Maths marks (0-100) 70


Enter Physics marks (0-100) 87

Enter Chemistry marks (0-100) 91

Enter Computer Science marks (0-100) & Student akash


kumar added successfully!

Enter your choice (1/2/3/4/5/6/7/8) 1

Enter student name aditya shah Enter student roll number 2

Enter student admission number 102

Enter student class: 12

Enter father's name: ppp

Enter mother's name am

Enter English marks (0-100) 91 Enter Maths marks (0-100) 99


Enter Physics marks (0-100) 91
Enter Chemistry marks (0-100) 99

Enter Computer Science marks (0-100) 99 Student aditya


shah added successfully
Individual report card

Enter your choice (1/2/3/4/5/6/7/814 Enter student


admission number 101

Enter student class 12

KAISIDIN HIGH SCHOOL

SESSION 2023-24

Report Card for raunak kumar (Admission Number: 101

Attribute

Value

Roll Number

Father's Name

Mother's Name
English

67.0

Maths

78.0

Physics

87.0

Chemistry

91.0 60.0

Computer Science Average Mark

76.6

Percentage
76.60%

Classwise average report card

Marks Modification

Enter your choice 11/2/3/4/5/6/7/5

Enter the class for which you want to display average marks:
12

Class-ise Average Barks for Class 12

Subject Average Bark

English

152.00 54.67

Physics
64 67

Chemistry

Computer Science 154.67

Enter your choice (1/2/3/4/5/6/7/8 3

Enter student admission number 101

Enter student class 12

Enter the subject to modify marks. English

Enter English marks (0-100 0

Marks for raunak kumar in English modified successfully


Deletion of data

Enter your choice (1/2/3/4/5/6/7/8): 2

Enter student admission number to delete 103

Student raushan singh (Admission Number: 103, Class: 12)


deleted successfully

Achiever's list

Enter your choice (1/2/3/4/5/6/7/8): 6

Enter the class for which you want to display achievers: 12

ACHIEVERS

Name (Admission Number)

Percentage

aditya shah (Admission Number: 102) (95.80%


List of Failed students

Enter your choice (1/2/3/4/5/6/7/8) 7

Enter the class for which you want to display failed students
12

FAILED STUDENTS

Namo

raushan singh
Conclusion

This project "REPORT CARD MANAGEMENT SYSTEM" will


fulfill the entire information requirement by the teacher for
report card. The whole system is menu driven and user-
friendly. This system is developed as a easy as possible for the
sake of user. The system is developed with a view of satisfying
the future requirements.

This system has been thoroughly tested and found to be error


free and it is highly portable. It also has option for future
development.
REFERENCE:-

While completing the project, I took help from the following


sources:

Computer science with python by Sumita Arora

Python handbook by Kunal banerjee

[Link]

[Link]

You might also like