My first python application
'''
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的更多相关文章
- --- no python application found, check your startup logs for errors
--- no python application found, check your startup logs for errors 碰到这个问题,请留意下系统执行的python版本和自己的djan ...
- uwsgi no python application found错误的解决(python3+centos6)
近期在努力把自己的项目从python2转到python3上,因为生产环境无法抛弃centos7,所以只好在centos7上安装了python3.装好了python3,将python命令软连接改成pyt ...
- [Spark][Python][Application]非交互式运行Spark Application 的例子
非交互式运行Spark Application 的例子 $ cat Count.py import sys from pyspark import SparkContext if __name__ = ...
- [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 ...
- python模块引用问题(比较杂乱,懒得整理)
1 在stackoverflows摘抄 If the import module in the same dir, use e.g: from . import core If the import ...
- 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 ...
- HTTP Header Injection in Python urllib
catalogue . Overview . The urllib Bug . Attack Scenarios . 其他场景 . 防护/缓解手段 1. Overview Python's built ...
- 利用vs2013简单初探Python
最近无聊,某天无意在vs2013上发现了Python...... Python介绍:可以自己搜索一下. 接下来,准备工具: Win7搭建开发环境.需要准备Python.PTVS2013. 1.http ...
- Python框架、库以及软件资源汇总
转自:http://developer.51cto.com/art/201507/483510.htm 很多来自世界各地的程序员不求回报的写代码为别人造轮子.贡献代码.开发框架.开放源代码使得分散在世 ...
随机推荐
- mysql设计-优化
mysql表复制 1.复制表结构 create table student like user; 2.复制表内容 insert into t3 select * from t1; mysql索引 1. ...
- GN算法---《Community structure in social and biological networks》这篇论文讲了什么?
用中文记下这篇论文的大致意思,以防止忘了.好记性不如烂笔头! 摘要:最近的一些研究在研究社交网络或WWW.研究者都集中于研究网络的“小世界性”,“幂率分布特性”,“网络传递性”(聚类性吧).本文提出网 ...
- Flink学习笔记:Operators之Process Function
本文为<Flink大数据项目实战>学习笔记,想通过视频系统学习Flink这个最火爆的大数据计算框架的同学,推荐学习课程: Flink大数据项目实战:http://t.cn/EJtKhaz ...
- P3705 [SDOI2017]新生舞会 01分数规划+费用流
$ \color{#0066ff}{ 题目描述 }$ 学校组织了一次新生舞会,Cathy作为经验丰富的老学姐,负责为同学们安排舞伴. 有\(n\)个男生和\(n\)个女生参加舞会买一个男生和一个女生一 ...
- golang包引用解析
golang包引用解析 环境变量配置如下: GOROOT----[C:\Go] GOPATH----[F:\workspace\go_home] vs code配置如下: F:\workspace\g ...
- 5.js与jQuery入口函数执行时机
js与jQuery入口函数执行时机区别: JS入口函数是在所有资源加载完成后,才执行.(包括:页面.外部js文件.外部css文件.图片) jQuery入口函数,是在文档加载完成后就执行.文档加载完成指 ...
- java 的在线下载文件 .pdf
java 的在线下载文件 .pdf 1.下载资源的本地位置 2.设置响应头 3.下载代码 1 PeriodicalResource periodicalResource = periodicalR ...
- Android 利用apache tomcat在自己的电脑上搭建服务器
1.什么叫服务器 装了服务器端的软件的那台电脑被称为服务器.常见的服务器的软件有apache tomcat. 2.Tomcat 介绍 tomcat是一种轻量级的web容器服务器,使用tomcat可以实 ...
- springMVC上传功能(单文件和多文件上传)
单文件和多文件上传 首先在xxx-select.xml里面配置上传的大小和编码 <bean id="multipartResolver" class="org.sp ...
- C++_类和动态内存分配6-复习各种技术及队列模拟
知识点: 队列:是一种抽象的数据类型(Abstract Data Type),可以存储有序的项目序列. 新项目被添加在队尾,并可以删除队首的项目.队列有些像栈.栈是在同一端进行添加和删除.这使得栈是一 ...