Python1 练习

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Python1 练习相关的知识,希望对你有一定的参考价值。

#!/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!!!"

技术分享


以上是关于Python1 练习的主要内容,如果未能解决你的问题,请参考以下文章

Python1+x证书培训笔记-附(大数据项目实战)-可做为简单课设

Python1+x证书培训笔记-附(大数据项目实战)-可做为简单课设

python基础练习题

Python的安装及小程序练习

Python基础知识练习题

1)python,现在用过的,后面推出每日练习语法与深度挖掘应用