python的white循环

# _*_coding:utf-8 _*_
import datetime
name = 'gyf'
passd = 123
count =0
now = datetime.datetime.now()
while count <3:
username = input("you name is:")
password = int(input("you password get my.it.s:"))
if name==username and passd ==password:
print("welcome {_name} come on china".format(_name=username))
break
elif password !=passd:
print("the {pasword1} is error".format(pasword1=password))
if count ==2:
print("I.m sorry,It.s locked,Three minutes later,please input again")
print(now)
count +=1
# 适合刚学习python的朋友学习
posted @ 2017-08-28 11:01  蜗牛·哥  阅读(1184)  评论(0编辑  收藏  举报