# ==================================
# 欢迎进入学员管理系统V1.0
# 1. 登录
# 2. 退出
# 3. 认证
# 4. 修改密码
# ==================================
#
# 编写程序,从键盘获取用户名和密码,然后判断,如果正确就输出以下信息
# 亲爱的xxx,欢迎登录学员管理系统
print('='*30)
print('欢迎进入学员管理系统V1.0')
print('''1.登陆
2.退出
3.认证
4.修改密码''')
print('='*30)
while True:
choose = input('Please select the number:')
if choose == '1':
name = input('Please enter your name:')
pwd = input('Please enter your password:') #int(input('') dic = {'pwd':123456} =========>input('') dic = {'pwd':'123456'}注意类型转换
dic = {'Lucy':'123456'}
if dic['Lucy'] == pwd :
print('Dear%s,欢迎登陆学员管理系统'%name)
if choose == '2':
isexit = input('您确定要退出系统吗?(Y/N):')
isexit.lower()
if isexit == 'y':
print('Thank you!')
break
print('='*30)
print('欢迎登陆学员管理系统V1.0')
print('1.登陆')
print('2.退出')
print('3.认证')
print('4.修改密码')
print('='*30)
while True:
choose = input('Please select the number above:')
if choose == '1':
username = input('Please enter your username:').title()
pwd = int(input('Please enter your password:'))
dic = {'Lucy':123456}
if pwd == dic['Lucy']:
print('Dear {},欢迎登陆学员管理系统!'.format(username))
break
else:
print('您输入的用户名与密码不匹配,请重新输入')
if choose == '2':
isexit = input('Are you sure you want to quit the system?(y/n)').lower()
if isexit == 'y':
print('Thank you for landing!')
break