0908 input 登录

while
if
else
==
input

# -*- coding:utf-8 -*-
flag = 0
while flag == 0 :
    username = input('请输入用户名:\n')
    password = input('请输入密码\n')
    if username == 'ps' and password =='ps':
        print('成功!')
        flag = 1
    else:
        print('输入不正确,请重新输入!')

 

posted @ 2018-09-08 20:55  快乐多巴胺  阅读(88)  评论(0编辑  收藏  举报