Commit 8dfe3e44 by BellCodeEditor

auto save

parent 48a8e923
Showing with 13 additions and 21 deletions
......@@ -4,31 +4,23 @@ import csv
with open("report.csv", "r", encoding="utf-8") as f1:
d = csv.reader(f1)
d = list(d)
print(d[7][3])
print(d[1][1])
#打印皮皮的语文成绩
k = 0
s = 0
for i in range(len(d)):
if d[i][0]=="小依":
if d[i][0] == "小贝":
k = i
break
for j in range(len(d[0])):
if d[0][j] == "历史":
if d[0][j] == "数学":
s = j
break
print(d[k][s])
for j in range(len(d[0])):
if d[0][j] == "数学":
s2 = j
break
for i in range(len(d)):
print(d[i][s2], end=" ")
print()
print(d[k])
zf = 0
for j in range(1,len(d[k])):
zf = zf + int(d[k][j])
print(zf)
pjf = 0
pjf = zf/(len(d[k])-1)
print("%.2f"%pjf)
\ No newline at end of file
for t in range(1,len(d)):
print(d[t][s], end=" ")
zf = zf + int(d[t][s])
print()
print(zf)
\ No newline at end of file
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