6.1--4:学员管理系统

# ==================================
#  欢迎进入学员管理系统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

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值