Commit 07ac174d by BellCodeEditor

save project

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