From 3d9f40e0908adef2a61c5baaaa0054d8f16f2100 Mon Sep 17 00:00:00 2001 From: CODECRAFTERSA Date: Tue, 1 Sep 2026 15:14:21 +0530 Subject: [PATCH 1/2] Implement student result analysis function --- .../student_result_analyzer.py | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Student_Result_Analyzer/student_result_analyzer.py diff --git a/Student_Result_Analyzer/student_result_analyzer.py b/Student_Result_Analyzer/student_result_analyzer.py new file mode 100644 index 00000000..6a681eed --- /dev/null +++ b/Student_Result_Analyzer/student_result_analyzer.py @@ -0,0 +1,37 @@ +def analyze_result(name, roll, marks): + total = sum(marks) + average = total / len(marks) + + if average >= 90: + grade = "A" + elif average >= 75: + grade = "B" + elif average >= 60: + grade = "C" + elif average >= 40: + grade = "D" + else: + grade = "Fail" + + below_40 = [] + + for i, mark in enumerate(marks): + if mark < 40: + below_40.append(f"Subject {i + 1}") + + print(f"Student: {name} (Roll: {roll})") + print(f"Total: {total}, Average: {average:.2f}") + print(f"Grade: {grade}") + + if below_40: + print("Subjects below 40:", ", ".join(below_40)) + else: + print("Subjects below 40: None") + + +if __name__ == "__main__": + name = "Aarav" + roll = 101 + marks = [88.5, 35.0, 76.0, 92.5, 48.0] + + analyze_result(name, roll, marks) From bd69df57abeb2597c72bf4d8ea3a45ebebf83689 Mon Sep 17 00:00:00 2001 From: CODECRAFTERSA Date: Tue, 1 Sep 2026 15:17:33 +0530 Subject: [PATCH 2/2] Add README for Student Result Analyzer Added a README file to describe the Student Result Analyzer program, including its functionality, languages used, and how to run it. --- Student_Result_Analyzer/README.md | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Student_Result_Analyzer/README.md diff --git a/Student_Result_Analyzer/README.md b/Student_Result_Analyzer/README.md new file mode 100644 index 00000000..97ca60eb --- /dev/null +++ b/Student_Result_Analyzer/README.md @@ -0,0 +1,33 @@ +# Student Result Analyzer + +## 🛠️ Description + +This Python program analyzes a student's academic results using their name, roll number, and marks. + +It calculates: +- Total marks +- Average marks +- Grade +- Subjects with marks below 40 + +## ⚙️ Languages or Frameworks Used + +Python + +## 🌟 How to run + +Open the `student_result_analyzer.py` file with a Python IDE and run the program. + +The program uses the following sample student data: + +- Name: Aarav +- Roll: 101 +- Marks: 88.5, 35.0, 76.0, 92.5, 48.0 + +### Sample Output + +```text +Student: Aarav (Roll: 101) +Total: 340.0, Average: 68.00 +Grade: C +Subjects below 40: Subject 2