Commit 920c3632 by BellCodeEditor

save project

parent 024fb164
Showing with 27 additions and 0 deletions
def g():
global total
total = []
while True:
unit= input("请输入:")
......
a={}
def j():
a={}
while 1:
e=int(input("添加请输入1,退出请输入其他整数"))
if e==1:
x=input("请输入添加的物品")
z=int(input("请输入添加的价格"))
a[x]=z
else:
return a
b=j()
print(b)
def my_sum(l):
d=0
for i in l.values():
d=d+i
return d
p=my_sum(b)
print(p)
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