Commit c0382063 by BellCodeEditor

save project

parent 7eaed43a
Showing with 26 additions and 0 deletions
# total = []
# while True:
# unit= input("请输入:")
# if unit== 'q':
# break
# else:
# total.append(unit)
# print(total)
def get_money():
wallet=[]
while True:
money=input("输入整数价格:")
if money=="q":
print("已退出")
break
try:
int(money)
wallet.append(money)
print("当前钱包内有:"+str(",".join(wallet)))
except:
print("记得输入整数")
print("-"*30)
print("当前钱包内有"+str(",".join(wallet)))
get_money()
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