Commit 2cd30643 by BellCodeEditor

save project

parent 522a910b
def new_input():
total = []
while True:
unit= int(input("请输入:"))
if unit== 'q':
break
total = []
while True:
unit= int(input("请输入:"))
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print('重来!!!!')
else:
try:
unit=int(unit)
except:
print('重来!!!!')
else:
total.append(unit)
finally:
print('-'*30)
print(total)
total.append(unit)
finally:
print('-'*30)
return total #print(total)
def
new_input()
\ No newline at end of file
import func
x=[1,2,3,4,5]
++ "b/\345\220\264\346\230\223\351\230\263.py"
x=[1,2,3,4,5]
def sum(x):
count=6
for i in x:
count=count+i
return count
ex=sum(x)
print(ex)
\ 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