用python写的登陆程序
2017-06-27 21:53
127 查看
#!/usr/bin/env python
# coding:utf-8
__author__ = "lvah"
'''
@author:linwei
@file:linwei.py
@contact:xc_123456789@qq.com
@time:6/26/179:33 AM
@desc
'''
i = 0
for i in range(0, 3):
username = raw_input("user:")
password = raw_input("password:")
if (username == 'root') and (password == 'redhat'):
print (" ")
print ("welcome to user manage system")
break
elif (username != 'root') or (password != 'redhat'):
print ("密码错误,请重新输入")
i = i + 1
else:
print (" ")
print ("你已经登陆过三次请10分钟后再登陆")
测试
# coding:utf-8
__author__ = "lvah"
'''
@author:linwei
@file:linwei.py
@contact:xc_123456789@qq.com
@time:6/26/179:33 AM
@desc
'''
i = 0
for i in range(0, 3):
username = raw_input("user:")
password = raw_input("password:")
if (username == 'root') and (password == 'redhat'):
print (" ")
print ("welcome to user manage system")
break
elif (username != 'root') or (password != 'redhat'):
print ("密码错误,请重新输入")
i = i + 1
else:
print (" ")
print ("你已经登陆过三次请10分钟后再登陆")
测试
相关文章推荐
- Python 基础 登陆小程序
- Python-S13作业-day1-之登陆程序
- python写了个登陆moofeel网站回复帖子并领取魔币的程序
- Python 登陆接口小程序V1
- Python实现用户登陆小程序
- 第一个python程序-判断登陆用户名和密码是否正确
- Python中的getpass模块介绍(登陆程序)
- 简单的Python登陆认证小程序
- python登陆,注册小程序
- Python 模拟登陆程序
- Python-用户登陆验证程序
- python登陆,注册小程序
- 1_python小程序之实现用户的注册登陆验证功能
- python初始---程序一(login登陆)
- Python 登陆接口小程序V2
- python的简易登陆小程序
- 用python写一个简单的用户登陆程序(要求写成函数)
- [Python]用Python编写程序修复"恶邮差"变种U病毒感染文件。
- ASP程序中同一个用户不允许同时登陆两次
- 用Python写个进程监控程序