Commit 07ac174d by BellCodeEditor

save project

parent 6c27f19c
Showing with 19 additions and 23 deletions
def s(): i=3
total = [] username="dsbdsb"
while True: userpassward="54188"
money=input("请输入(q退出):") while True:
if money== "q": if i>0:
name=input("请输入用户名")
passward=input("请输入密码")
i=i-1
if username==name and userpassward==passward:
priut("登录成功")
break break
else: if name != username:
try: print("用户名不存在,请重新输入")
money=int(money) continue
except: if passward != userpassward:
print("请重新输入一个数字") print("密码错误,请重新输入")
else: else:
total.append(money) print("你的账户已锁定,请一小时后再来")
finally: print("大傻逼登录失败")
print("-----------------------") print("欢迎来的大傻逼世界")
return total
def sum(money):
count=0
for i in money:
count=count+i
return count
price=s()
pay=sum(price)
print("您一共消费了"+ str(pay) + "元!扫码还是现金呢?")
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