student-manager-domo 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_manager_domo-0.1.0/LICENSE +15 -0
- student_manager_domo-0.1.0/PKG-INFO +20 -0
- student_manager_domo-0.1.0/README.md +10 -0
- student_manager_domo-0.1.0/pyproject.toml +14 -0
- student_manager_domo-0.1.0/setup.cfg +4 -0
- student_manager_domo-0.1.0/student_manager/__init__.py +1 -0
- student_manager_domo-0.1.0/student_manager/main.py +92 -0
- student_manager_domo-0.1.0/student_manager_domo.egg-info/PKG-INFO +20 -0
- student_manager_domo-0.1.0/student_manager_domo.egg-info/SOURCES.txt +9 -0
- student_manager_domo-0.1.0/student_manager_domo.egg-info/dependency_links.txt +1 -0
- student_manager_domo-0.1.0/student_manager_domo.egg-info/top_level.txt +3 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Yueyuan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: student-manager-domo
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: 一个用于学生成绩管理的小软件
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Requires-Python: >=3.9
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Dynamic: license-file
|
|
10
|
+
|
|
11
|
+
# 学生成绩管理系统
|
|
12
|
+
|
|
13
|
+
## 项目介绍
|
|
14
|
+
这是一个python项目
|
|
15
|
+
|
|
16
|
+
## 主要功能
|
|
17
|
+
1. 添加学生
|
|
18
|
+
2. 录入成绩
|
|
19
|
+
3. 成绩排序
|
|
20
|
+
4. 查看平均分
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "student-manager-domo"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "一个用于学生成绩管理的小软件"
|
|
9
|
+
requires-python = ">=3.9"
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
|
|
13
|
+
[tool.setuptools.packages.find]
|
|
14
|
+
where = ["."]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .main import analyze_score,main
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import time
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def analyze_score(scores, passlines, excellent_line):
|
|
5
|
+
"""
|
|
6
|
+
分析学生成绩
|
|
7
|
+
scores:学生成绩列表
|
|
8
|
+
passlines: 及格线
|
|
9
|
+
excellent_line:优秀线
|
|
10
|
+
sum:总分
|
|
11
|
+
return: 成绩分析结果
|
|
12
|
+
"""
|
|
13
|
+
for score in scores[0:3]:
|
|
14
|
+
if score < passlines[0]:
|
|
15
|
+
print("不及格")
|
|
16
|
+
elif excellent_line[0] <= score:
|
|
17
|
+
print("优秀")
|
|
18
|
+
elif score < excellent_line[0]:
|
|
19
|
+
print("及格")
|
|
20
|
+
|
|
21
|
+
for score in scores[3:6]:
|
|
22
|
+
if score < passlines[1]:
|
|
23
|
+
print("不及格")
|
|
24
|
+
elif excellent_line[1] <= score:
|
|
25
|
+
print("优秀")
|
|
26
|
+
elif score < excellent_line[1]:
|
|
27
|
+
print("及格")
|
|
28
|
+
total2 = 0
|
|
29
|
+
for score in scores[0:3]:
|
|
30
|
+
total2 += score
|
|
31
|
+
print(f'语数英总分:{total2}')
|
|
32
|
+
total1 = 0
|
|
33
|
+
for score in scores[3:6]:
|
|
34
|
+
total1 += score
|
|
35
|
+
print(f'物化生总分:{total1}')
|
|
36
|
+
total = total1 + total2
|
|
37
|
+
print(f'总分:{total}')
|
|
38
|
+
return total
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def main():
|
|
42
|
+
students = []
|
|
43
|
+
while True:
|
|
44
|
+
print("学生成绩管理系统")
|
|
45
|
+
print("1.录入成绩(输入1)")
|
|
46
|
+
print("2.查看总分排名(输入2)")
|
|
47
|
+
print("3.查看班级平均分(输入3)")
|
|
48
|
+
print("4.退出(输入4)")
|
|
49
|
+
choice = int(input("请选择功能"))
|
|
50
|
+
if choice == 1:
|
|
51
|
+
student_count = int(input("请输入录入人数"))
|
|
52
|
+
for i in range(student_count):
|
|
53
|
+
name = input("学生姓名")
|
|
54
|
+
Chinese = float(input("请输入语文成绩="))
|
|
55
|
+
math = float(input("请输入数学成绩="))
|
|
56
|
+
English = float(input("请输入英语成绩="))
|
|
57
|
+
Physics = float(input("请输入物理成绩="))
|
|
58
|
+
Chemistry = float(input("请输入化学成绩="))
|
|
59
|
+
Biology = float(input("请输入生物成绩="))
|
|
60
|
+
scores = [Chinese, math, English, Physics, Chemistry, Biology]
|
|
61
|
+
passlines = [90, 60]
|
|
62
|
+
excellent_line = [120, 90]
|
|
63
|
+
total = analyze_score(scores, passlines, excellent_line, )
|
|
64
|
+
students.append([name, total])
|
|
65
|
+
print("录入完毕")
|
|
66
|
+
continue
|
|
67
|
+
elif choice == 2:
|
|
68
|
+
if not students:
|
|
69
|
+
print("请先录入成绩")
|
|
70
|
+
print("正在返回菜单...")
|
|
71
|
+
time.sleep(2)
|
|
72
|
+
print("正在返回菜单......")
|
|
73
|
+
else:
|
|
74
|
+
print("排名由高到低")
|
|
75
|
+
students.sort(key=lambda x: x[1], reverse=True)
|
|
76
|
+
for student in students:
|
|
77
|
+
print(student)
|
|
78
|
+
time.sleep(3)
|
|
79
|
+
elif choice == 3:
|
|
80
|
+
if not students:
|
|
81
|
+
print("请先录入成绩")
|
|
82
|
+
print("正在返回菜单......")
|
|
83
|
+
time.sleep(2)
|
|
84
|
+
else:
|
|
85
|
+
t = 0
|
|
86
|
+
for student in students:
|
|
87
|
+
t += student[1]
|
|
88
|
+
average = t // len(students)
|
|
89
|
+
print(f'平均分{average}')
|
|
90
|
+
|
|
91
|
+
elif choice == 4:
|
|
92
|
+
break
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: student-manager-domo
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: 一个用于学生成绩管理的小软件
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Requires-Python: >=3.9
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Dynamic: license-file
|
|
10
|
+
|
|
11
|
+
# 学生成绩管理系统
|
|
12
|
+
|
|
13
|
+
## 项目介绍
|
|
14
|
+
这是一个python项目
|
|
15
|
+
|
|
16
|
+
## 主要功能
|
|
17
|
+
1. 添加学生
|
|
18
|
+
2. 录入成绩
|
|
19
|
+
3. 成绩排序
|
|
20
|
+
4. 查看平均分
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
student_manager/__init__.py
|
|
5
|
+
student_manager/main.py
|
|
6
|
+
student_manager_domo.egg-info/PKG-INFO
|
|
7
|
+
student_manager_domo.egg-info/SOURCES.txt
|
|
8
|
+
student_manager_domo.egg-info/dependency_links.txt
|
|
9
|
+
student_manager_domo.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|