Commit 0c97fe67 by BellCodeEditor

save project

parent 7a354197
Showing with 12 additions and 19 deletions
username='123'
userpassword='1156'
i=3
while True:
if i>0:
name=input("请输入用户名:")
password=input("请输入密码:")
i-=1
if name==username and password==userpassword:
break
elif name!=username:
print("请重新输入用户名!")
else:
print("请重新输入密码!")
cost={'苹果':5.2,'荔枝':12.9,'香蕉':2.4,'桂圆':15,'葡萄':9.3,'蓝莓':10}
a=input("种类:")
b=input("价钱:")
if a in cost:
if float(b)<cost[a]:
cost[a]=float(b)
print(a+'的价钱为'+b+'元')
else:
print("你的账户已锁定!")
exit()
print("登陆成功!")
\ No newline at end of file
print('涨价了,我们不买!')
else:
cost[a]=float(b)
print(a+'的价钱已录入!')
\ No newline at end of file
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