Commit e6543c37 by BellCodeEditor

save project

parent 05e7d622
Showing with 29 additions and 0 deletions
import ww
s =ww.new_input()
n =ww.sum_input()
\ No newline at end of file
dds = {}
def new_input():
global dds
while True:
x = input("请输入选手编号")
if x in dds:
print("重复输入选手编号")
continue
if x == "q":
print("用户退出程序")
break
if x == "ok":
print("最终结果为",dds)
break
y = input("请输入选手得分")
dds[x]=y
print(dds)
def sum_input():
global dds
w = 0
for v in dds.values():
u = v
w+=u
print(w)
\ 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