Commit 50e1721f by BellCodeEditor

save project

parent f696213e
Showing with 18 additions and 1 deletions
# 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本' bros
s1={"数学":100,"语文":120}
s2={"数学":150,"语文":102}
score={"小明":s1,"小米":s2}
while True:
a=input("名字")
if a in score:
s=""
for m,n in score[a].items():
s=s+m+str(n)+" "
print(a+"你的成绩"+s)
\ No newline at end of file
cool=open(r'C:\Users\cc\Desktop\text.txt','a',encoding='utf-8')
cool.write('yoyo: dahuaidan\n')
cool.write('miaomiao:dahuaidan\n')
cool.write('youzi:dahuaidan\n')
cool.close()
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