Commit 596ad27d by BellCodeEditor

save project

parent cee33f4b
Showing with 43 additions and 7 deletions
{
"python.testing.unittestArgs": [
"-v",
"-s",
".",
"-p",
"*test.py"
],
"python.testing.pytestEnabled": false,
"python.testing.nosetestsEnabled": false,
"python.testing.unittestEnabled": false,
"python.testing.promptToConfigure": false
}
\ No newline at end of file
try:
age = int(input('你今年几岁了?'))
except:
print('要输入整数啊')
print('程序结束~~')
\ No newline at end of file
def new_input():
total = []
while True:
unit=input("请输入,按p退出:")
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print('要输入整数')
else:
total.append(unit)
return total
price=new_input
print('='*30)
print(price)
s=0
# for i in price:
# s+=i
# print(str(s))
print()
# print(total)
\ No newline at end of file
......@@ -15,7 +15,7 @@ def new_input():
return total
price=new_input
print('=*30')
price(price)
print(price)
s=0
for i in price:
s+=i
......
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