标签:作业 log and sub 自己 har while name put
其实都是很多天了,很抱歉对不起自己,不过都是在学习,顺便把自己写的代码附上去吧,下面写的是一个登陆界面的输入过程,很简陋,也当做是个作业吧,顺便也是放弃了sublime,选择了pycharm
_user="steven"
_password=str(123456)
count=0
while count<=2:
user=input(‘name:‘)
password=input(‘password:‘)
if _user==user and _password==password:
print(‘welcome %s !‘%user)
break
else:
print(‘name or password is worning‘)
count+=1
if count==3:
wanted=input(‘还想玩吗?【y/n】\n‘)
if wanted==‘y‘ or wanted==‘Y‘:
count=0
if count==3:
print(‘-------你他妈的傻逼吗?还在那尝试------‘)
标签:作业 log and sub 自己 har while name put
原文地址:http://www.cnblogs.com/Joven-Ye/p/7354767.html