Commit a071cf31 by BellCodeEditor

save project

parent 1d9b0e50
Showing with 17 additions and 12 deletions
total = [] def d():
try: total = []
unit= input("请输入:") while True:
unit=int(unit) unit= input("请输入:")
except : if unit=='q':
print("请输入数字!!!") break
else:
try:
else: int(unit)
total.append(int(unit)) except:
print(total) print("请输入整数")
\ No newline at end of file else:
total.append(int(unit))
return total
lkj=d()
print(lkj)
\ 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