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

Python 练习1

时间:2017-06-29 17:46:12      阅读:170      评论:0      收藏:0      [点我收藏+]

标签:python

#!/usr/bin/env python
#codingutf-8
count = 0
while count < 3:
   username = raw_input("USERNAME:")
   password = raw_input("PASSWORD:")
   if username == "user" and password == "123":
       print "welcome!!!"
       
break
   elif
username != "user" and password != "123":
       print "username or password wrong!!!"
   
elif username == "user" and password != "123":
       print "password is wrong!!!"
   
elif username != "user" and password == "123":
       print "username or password is wrong!!!"
   
count +=1
   
if count == 3:
       print "go away ang don‘t back!!!"

技术分享

Python 练习1

标签:python

原文地址:http://supermk.blog.51cto.com/12763230/1942911

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