Commit 4722ac20 by BellCodeEditor

save project

parent 3faf4b37
Showing with 69 additions and 2 deletions
"""读取csv文件""""
\ No newline at end of file
"""读取csv文件"""
import csv
with open("report.csv", "r", encoding="utf-8") as sb1:
sb2 = csv.reader(sb1)
sb2 = list(sb2)
print(sb2[7 ][3])
for i in range(len(sb2)):
if sb2[i][0]=="小贝":
b=i
break
for j in range(len(sb2)):
if sb2[0][j]=="数学":
s=j
break
for j in range(len(sb2[0])):
if sb2[0][j]=="英语":
s2=j
break
print(sb2[b][d])
for i in range(len(sb2)):
print(sb2[i][s2],end=" ")
print()
zf = 0
for g in range(1,len(d[b])):
zf = zf + int(sb2[b][j])
print(zf)
pjf = 0
pjf = zf/(len(sb2[k])-1)
print("%.2f"%pjf)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment