Commit 2cd30643 by BellCodeEditor

save project

parent 522a910b
def new_input(): def new_input():
total = [] total = []
while True: while True:
unit= int(input("请输入:")) unit= int(input("请输入:"))
if unit== 'q': if unit== 'q':
break break
else:
try:
unit=int(unit)
except:
print('重来!!!!')
else: else:
try: total.append(unit)
unit=int(unit) finally:
except: print('-'*30)
print('重来!!!!') return total #print(total)
else: def
total.append(unit)
finally:
print('-'*30)
print(total)
new_input() 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