|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
yh={}
def new_use ():
name=input('请输入用户名:')
while name in yh:
name=input('此用户名已经被使用,请重新输入:')
pasw=input('请输入密码:')
yh[name]=pasw
print('注册成功,赶紧试试登录吧^_^')
def load():
times=3
name=input('请输入用户名:')
while name not in yh:
name=input('您输入的用户名不存在,请重新输入:')
pasw=''
while (pasw!=yh[name])and(times>0):
pasw=input('请输入密码:')
if pasw!=yh[name]:
times-=1
print('您还有%d次机会'%times)
if(times>0):
print('欢迎进入xxoo系统,请点击右上角的x结束程序!')
return times
def chart():
print('|-------新建用户:N/n-------|')
print('|-------登录账号:E/e-------|')
print('|-------退出程序:Q/q-------|')
while 1:
chart()
temp=input('|-------请输入代码指令:')
while temp not in 'NEQneq':
print ('输入有误!!!')
chart()
temp=input('|-------请输入代码指令:')
if (temp=='N')or(temp=='n'):
new_use()
elif (temp=='E')or(temp=='e'):
times=load()
if times==0:
print('非法登录操作,程序将自动退出!!!')
break
else:
print('xxoo系统感谢您的使用^_^')
break
程序运行的时候回自己输入一次指令码,为什么????
求大佬解惑
是编辑器自己给你输入的,不用理会,直接运行程序看看
|
|