Commit 6721ccb0 by BellCodeEditor

save project

parent db0d9878
Showing with 30 additions and 31 deletions
......@@ -6,7 +6,7 @@
"-p",
"*test.py"
],
"python.testing.pytestEnabled": false,
"python.testing.pytestEnabled": true,
"python.testing.nosetestsEnabled": false,
"python.testing.unittestEnabled": false,
"python.testing.promptToConfigure": false
......
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
# def new_input():
zx = ['爆肚',44]
xx = ['米饭',2]
vx = ['鱼香肉丝',32]
total = [str(zx)+zx,str(xx)+xx,str(vx)+vx]
print(total)
# while True:
# print("菜单:"+total)
# unit=input("请输入,按q退出")
# if unit== 'q':
# break
# else:
# try:
# unit=int(unit)
# except:
# print('要输入整数')
# else:
# total.append(unit)
# print(total)
# return total
# price=new_input()
# print('=*30')
# print(price)
# s=0
# for i in price:
# s+=i
# print("价格是:"+str(s))
def new_input():
total = []
while True:
unit=int(input("请输入,按p退出"))
unit=input("请输入,按q退出")
if unit== 'q':
break
else:
......@@ -19,4 +19,4 @@ print(price)
s=0
for i in price:
s+=i
print(str(s))
print("价格是:"+str(s))
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