student-performance-analyzer-sidharth242707 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- student_performance_analyzer_sidharth242707-0.1.0/PKG-INFO +5 -0
- student_performance_analyzer_sidharth242707-0.1.0/performance_pkg/ActualTask.py +44 -0
- student_performance_analyzer_sidharth242707-0.1.0/performance_pkg/__init__.py +6 -0
- student_performance_analyzer_sidharth242707-0.1.0/pyproject.toml +13 -0
- student_performance_analyzer_sidharth242707-0.1.0/setup.cfg +4 -0
- student_performance_analyzer_sidharth242707-0.1.0/student_performance_analyzer_sidharth242707.egg-info/PKG-INFO +5 -0
- student_performance_analyzer_sidharth242707-0.1.0/student_performance_analyzer_sidharth242707.egg-info/SOURCES.txt +7 -0
- student_performance_analyzer_sidharth242707-0.1.0/student_performance_analyzer_sidharth242707.egg-info/dependency_links.txt +1 -0
- student_performance_analyzer_sidharth242707-0.1.0/student_performance_analyzer_sidharth242707.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
|
|
2
|
+
# Function 1: Calculate class average
|
|
3
|
+
def class_average(students):
|
|
4
|
+
|
|
5
|
+
if len(students) == 0:
|
|
6
|
+
raise ValueError("Student list cannot be empty")
|
|
7
|
+
|
|
8
|
+
total = 0
|
|
9
|
+
|
|
10
|
+
for student in students:
|
|
11
|
+
marks = student["marks"]
|
|
12
|
+
|
|
13
|
+
if marks < 0 or marks > 100:
|
|
14
|
+
raise ValueError("Marks must be between 0 and 100")
|
|
15
|
+
|
|
16
|
+
total += marks
|
|
17
|
+
|
|
18
|
+
average = total / len(students)
|
|
19
|
+
|
|
20
|
+
return average
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# Function 2: Find the topper
|
|
24
|
+
def topper_details(students):
|
|
25
|
+
|
|
26
|
+
if len(students) == 0:
|
|
27
|
+
raise ValueError("Student list cannot be empty")
|
|
28
|
+
|
|
29
|
+
topper = max(students, key=lambda student: student["marks"])
|
|
30
|
+
|
|
31
|
+
return topper["name"], topper["marks"]
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# Function 3: Identify students needing support
|
|
35
|
+
def identify_support_students(students, threshold=40):
|
|
36
|
+
|
|
37
|
+
if not 0 <= threshold <= 100:
|
|
38
|
+
raise ValueError("Invalid threshold")
|
|
39
|
+
|
|
40
|
+
return [
|
|
41
|
+
student["name"]
|
|
42
|
+
for student in students
|
|
43
|
+
if student["marks"] < threshold
|
|
44
|
+
]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "student-performance-analyzer-sidharth242707"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "A Python package for analyzing student performance"
|
|
9
|
+
requires-python = ">=3.8"
|
|
10
|
+
|
|
11
|
+
[tool.setuptools.packages.find]
|
|
12
|
+
where = ["."]
|
|
13
|
+
include = ["performance_pkg*"]
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
pyproject.toml
|
|
2
|
+
performance_pkg/ActualTask.py
|
|
3
|
+
performance_pkg/__init__.py
|
|
4
|
+
student_performance_analyzer_sidharth242707.egg-info/PKG-INFO
|
|
5
|
+
student_performance_analyzer_sidharth242707.egg-info/SOURCES.txt
|
|
6
|
+
student_performance_analyzer_sidharth242707.egg-info/dependency_links.txt
|
|
7
|
+
student_performance_analyzer_sidharth242707.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
performance_pkg
|