Commit bccd2236 by BellCodeEditor

auto save

parent b17e1fb5
Showing with 18 additions and 5 deletions
{
"python.testing.pytestArgs": [
"."
],
"python.testing.unittestEnabled": false,
"python.testing.nosetestsEnabled": false,
"python.testing.pytestEnabled": true
}
\ No newline at end of file
...@@ -4,11 +4,15 @@ def x (): ...@@ -4,11 +4,15 @@ def x ():
unit= input("请输入:") unit= input("请输入:")
try: try:
unit= int (unit) unit= int (unit)
except expression as identifier: except:
print("请输入整数")
if unit== 'q': if unit== 'q':
break break
print("请输入整数")
else: else:
total.append(unit) total.append(unit)
print(total) return total
x () def sum(y):
\ No newline at end of file count = 0
for i in sum:
count=count+i
return count
\ 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