Commit 829e3d44 by BellCodeEditor

save project

parent 54ab6cfb
Showing with 21 additions and 9 deletions
total = [] def new_input():
while True: total = []
unit= input("请输入:") jiage=0
if unit== 'q': while True:
break unit= input("请输入:")
else: if unit== 'q':
total.append(unit) break
print(total)
\ No newline at end of file else:
total.append(int(unit))
print(total)
jiage+=int(unit)
print(jiage)
try:
new_input():
except:
print("要输入整数"):
else:
for i in total
\ 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