Commit 57d41817 by BellCodeEditor

save project

parent b57fa556
import func
a=func.pp()
b=func.rh(a)
print(b)
\ No newline at end of file
......@@ -4,12 +4,14 @@ def pp():
unit= input("请输入:")
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print("请输入数字!")
else:
total.append(unit)
print(total)
pp()
\ No newline at end of file
try:
unit=int(unit)
except:
print("请输入数字!")
else:
total.append(unit)
return total
def rh(b):
a=sum(b)
return a
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