Commit 03212f1c by BellCodeEditor

auto save

parent 7981f11b
Showing with 2 additions and 10 deletions
...@@ -4,10 +4,7 @@ def new_input(): ...@@ -4,10 +4,7 @@ def new_input():
q= input("请输入:") q= input("请输入:")
if q== 'q': if q== 'q':
break break
try:
q=int(q)
except:
print("请输入一个数字!")
else: else:
e.append(q) e.append(q)
print(e) print(e)
...@@ -15,9 +12,3 @@ def new_input(): ...@@ -15,9 +12,3 @@ def new_input():
w=new_input() w=new_input()
print(w) print(w)
\ No newline at end of file
def sum(pig):
for i in w:
k = k + i
print('你已消费了'+str(k))
return k
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