Commit ef69958c by BellCodeEditor

save project

parent dc70412a
Showing with 26 additions and 0 deletions
def new_input():
total = []
while True:
SB=input("请输入:")
try:
unit= int(SB)
except:
if SB=="q":
break
else:
print("SB,输整数")
else:
total.append(unit)
return total
def add_DSB(kly):
kly2=0
for i in kly:
kly2 += i
return kly2
gkj=new_input()
kly3=add_DSB(gkj)
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