'''

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. docker kubernetes swarm spring cloud结合学习资源

    http://www.docin.com/p-2062732301.html https://blog.csdn.net/michael_hm/article/details/79213839 htt ...

  2. Qt 学习之路 2(27):渐变

    Qt 学习之路 2(27):渐变 豆子 2012年11月20日 Qt 学习之路 2 17条评论 渐变是绘图中很常见的一种功能,简单来说就是可以把几种颜色混合在一起,让它们能够自然地过渡,而不是一下子变 ...

  3. Python + gevent模块对单个接口进行并发测试 1

    本文知识点 利用gevent模块进行并发测试 代码如下 from gevent import monkey monkey.patch_all() import requests import geve ...

  4. HTML 5 桌面提醒

    <script> function showNotice(title,msg){ var Notification = window.Notification || window.mozN ...

  5. 【算法笔记】B1038 统计同成绩学生

    1038 统计同成绩学生 (20 分) 本题要求读入 N 名学生的成绩,将获得某一给定分数的学生人数输出. 输入格式: 输入在第 1 行给出不超过 10​5​​ 的正整数 N,即学生总人数.随后一行给 ...

  6. 栈和递归的关系 144:Binary Tree Preorder Traversal

    前序遍历:根左右 //用栈来实现非递归解法/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeN ...

  7. CF F - Tree with Maximum Cost (树形DP)给出你一颗带点权的树,dist(i, j)的值为节点i到j的距离乘上节点j的权值,让你任意找一个节点v,使得dist(v, i) (1 < i < n)的和最大。输出最大的值。

    题目意思: 给出你一颗带点权的树,dist(i, j)的值为节点i到j的距离乘上节点j的权值,让你任意找一个节点v,使得dist(v, i) (1 < i < n)的和最大.输出最大的值. ...

  8. v-show, v-if, 以及动态组件的区别

    vue提供了v-if, v-show来动态显示隐藏组件 同时也提供了<component>元素在一个挂载点上动态的切换组件, 通过 is 来决定哪个组件被渲染显示 配合<keep-a ...

  9. Oracle下lag和lead分析函数

    [转自] http://blog.csdn.net/thinkscape/article/details/8290894 Lead和Lag分析函数可以在同一次查询中取出同一字段的前N行的数据(Lag) ...

  10. bugzilla配置邮箱发送邮件问题

    2018-09-25 1.bugzilla注册账号,邮件无法发送 需要登录管理账号,配置邮箱服务 2.Can't locate object method "quit" via p ...