Commit 1b3d314d by BellCodeEditor

save project

parent 05e7d622
import func
data = func.shuru()
s = fucu.
\ No newline at end of file
def shuru():
total = []
while True:
try:
s = input("请输入数字:如果输入q则结束\n")
unit= int(s)
except:
if s == 'q':
break
print("请输入数字")
else:
total.append(unit)
return total
def qiuhe(total):
count = 0
for i in total:
count = count + i
return count
jieguo = shuru()
s = qiuhe(jieguo)
print(s)
import func
data = func.shuru()
s = fucu. qiuhe(data)
print(s)
\ 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