码迷,mamicode.com
首页 > 编程语言 > 详细

python--学习--用户名和密码验证

时间:2018-03-27 12:21:44      阅读:190      评论:0      收藏:0      [点我收藏+]

标签:python--练习--用户名和密码验证

#!/usr/bin/python3
user=‘whoooo‘
password="1234567"

name=input("请输入用户名:")
namepasswd=input("请输入密码:")
count1=1
count2=1
while name!=user :
print("careful ,you can only input 3 times,you have already iput ",count1,"times")
if count1<3:
name=input("请输入用户名:")
count1=count1+1
else:
print("you have already input 3 times,you have been permissed")
break
else:
while namepasswd!=password :
print("careful ,you can only input 3 times,you have already iput ",count2,"times")
if count2<3:
namepasswd=input("请输入密码:")
count2=count2+1
else:
print("you have already input 3 times,you have been permissed")
break
else:
print("welcome to mange your system")

python--学习--用户名和密码验证

标签:python--练习--用户名和密码验证

原文地址:http://blog.51cto.com/11972980/2091552

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!