Commit 882bc161 by BellCodeEditor

auto save

parent e736e9b0
Showing with 9 additions and 8 deletions
...@@ -4,25 +4,26 @@ def new_input(): ...@@ -4,25 +4,26 @@ def new_input():
while _541881452>0: while _541881452>0:
SB=input("请输入分数:") SB=input("请输入分数:")
try: try:
unit= float(SB) unit= int(SB)
except: except:
if SB=="q": if SB=="q":
break break
else: else:
print("SB,输整数或小数") print("SB,输整数或小数!")
_541881452+=1 _541881452+=1
else: else:
total.append(unit) total.append(unit)
_541881452-=1 _541881452-=1
return total return total
def sun(_54188): def add_DSB(kly):
_1452=0 kly2=0
for i in _54188: for i in kly:
_1452 += i kly2 += i
return _1452 return kly2
gkj=new_input() gkj=new_input()
kly3=sum(gkj) kly3=add_DSB(gkj)
print(kly3) print(kly3)
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