'''

Authon:WSE_Gordon

This application is use for the costomer to login the application.

The Costomer need to input his or her username and password.

But it has a bed part. It is all the password is the same, I need to fix it late.

'''

seq_usernames=[]
seq_passwords=[]
with open("user_table.txt",'r') as f:
first_username = f.readline()[9:]
print(first_username)
seq_usernames.append(first_username)
first_password = f.readline()[9:]
print(first_password)
seq_passwords.append(first_password)
second_username = f.readline()[9:]
print(second_username)
seq_usernames.append(second_username)
second_password = f.readline()[9:]
print(second_password)
seq_passwords.append(second_password)
f.close()
print(seq_usernames)
print(seq_passwords)
seq_user = dict.fromkeys(seq_usernames,'123456')
print(seq_user) #用户输入
i = 0
for i in range(3):
username = input("请输入用户名username=")
username = username + '\n'
password = input("请输入密码password=")
if username in seq_user and password == seq_user.get(username):
print(seq_user.get(username))
print("Congrantulation! You're right!")
break
else:
print("Your are wrong,You need test again!")
i = i + 1 else:
print("Sorry,You don't have time anymore")

My first python application的更多相关文章

  1. --- no python application found, check your startup logs for errors

    --- no python application found, check your startup logs for errors 碰到这个问题,请留意下系统执行的python版本和自己的djan ...

  2. uwsgi no python application found错误的解决(python3+centos6)

    近期在努力把自己的项目从python2转到python3上,因为生产环境无法抛弃centos7,所以只好在centos7上安装了python3.装好了python3,将python命令软连接改成pyt ...

  3. [Spark][Python][Application]非交互式运行Spark Application 的例子

    非交互式运行Spark Application 的例子 $ cat Count.py import sys from pyspark import SparkContext if __name__ = ...

  4. [Python] Create a Log for your Python application

    Print statements will get you a long way in monitoring the behavior of your application, but logging ...

  5. python模块引用问题(比较杂乱,懒得整理)

    1 在stackoverflows摘抄 If the import module in the same dir, use e.g: from . import core If the import ...

  6. Python’s SQLAlchemy vs Other ORMs[转发 3]Django's ORM

    Django's ORM Django is a free and open source web application framework whose ORM is built tightly i ...

  7. HTTP Header Injection in Python urllib

    catalogue . Overview . The urllib Bug . Attack Scenarios . 其他场景 . 防护/缓解手段 1. Overview Python's built ...

  8. 利用vs2013简单初探Python

    最近无聊,某天无意在vs2013上发现了Python...... Python介绍:可以自己搜索一下. 接下来,准备工具: Win7搭建开发环境.需要准备Python.PTVS2013. 1.http ...

  9. Python框架、库以及软件资源汇总

    转自:http://developer.51cto.com/art/201507/483510.htm 很多来自世界各地的程序员不求回报的写代码为别人造轮子.贡献代码.开发框架.开放源代码使得分散在世 ...

随机推荐

  1. struts2的主要工作流程

    struts2的框架结构图 struts2的主要工作流程: 1.客户端请求一个HttpServletRequest的请求,如在浏览器中输入http://localhost: 8080/bookcode ...

  2. CentOS7.3托管磁盘虚拟机扩容数据磁盘

    随着托管磁盘的上线,虚拟机支持的单块磁盘容量从1TB到达了4TB,客户对单块磁盘容量的需求量也会变的很大. 操作之前需要重点查看: 由于扩容磁盘的操作非同小可,一旦哪一步出现问题,就会导致分区损坏,数 ...

  3. 有关unixODBC:Data source name not found, and no default driver specified的问题

    还是昨天测试postgresql的有关Mirroring Controller的功能时出的问题(真TM是个坑). 首先说下环境: 操作系统平台:RHEL6 x86_64 unixODBC版本:2.3. ...

  4. linux系统下的日志,此日志对于系统安全来说是非常重要的一 个机制!!

    var/log/messages /etc/logrotate.conf 日志切割配置文件 (参考https://my.oschina.net/u/2000675/blog/908189) dmesg ...

  5. X7-2计算节点关于网卡的一点变化

    官方文档记载了X7-2的计算节点网卡信息如下: 2 x InfiniBand 4X QDR (40 Gbps) ports (PCIe 3.0), both ports active 2 x 1 Gb ...

  6. SQL函数:返回传入的字符中的数字或者字符

    /******返回传入的字符串的所有字符 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOALTER function [dbo].[F_Get ...

  7. Vuex 使用了 module 后的访问方法 ..

    如果 使用了  module 和 namespace state 数据:=>   this.$store.state.User.info  (user 是模块名字. info 是 state 里 ...

  8. python之常用的数据类型

    1. 变量的定义以及声明 在学习变量之前,咱们需要知道变量的命名规则: ① 变量必须由数字字母下划线构成,如a_1 ② 变量名不能以数字开头,如1a ③ 需要遵循驼峰命名法 给变量赋值通常采用“=”, ...

  9. LeetCode记录之9——Palindrome Number

    LeetCode真是个好东西,本来闲了一下午不想看书,感觉太荒废时间了就来刷一道题.能力有限,先把easy的题目给刷完. Determine whether an integer is a palin ...

  10. Luogu P1156 垃圾陷阱 DP

    f[i][j]表示在第i个垃圾,高度为j的最大生命值 转移分三部分: 如果j>=当前垃圾的高度,且两个垃圾间的时间小于等于上一个状态f[i-1][j-a[i].v]的生命值,则可以垫高度 如果j ...