Warning: count(): Parameter must be an array or an object that implements Countable in /www/wwwroot/blog.hsmao.cn/usr/plugins/AMP/Action.php on line 388
笔记

hmao的日记

笔记

#coding:utf-8
'''
login 登录login,login
register注册register,register
'''
import easygui
class User():
    def __init__(self,name,pwd):
        self.name=name
        self.pwd=pwd
    def regsiter(self):
        easygui.msgbox('用户名是:'+self.name+'\n'+'密码是:'+self.pwd)
name=easygui.enterbox('请输入用户名')
pwd=easygui.enterbox('输入密码')
user=User(name,pwd)
user.regsiter()
while True:
    myname=easygui.enterbox('输入登陆账号')
    if myname==name:
        mypwd=easygui.enterbox('登录密码')
        if mypwd==pwd:
            easygui.msgbox('登录成功')
            break;
        else:
            easygui.msgbox('密码错误')
    else:
        easygui.msgbox('账号错误')

myname=easygui.enterbox('请输入')

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »

因本文不是用Markdown格式的编辑器书写的,转换的页面可能不符合AMP标准。