# -*-coding: utf-8 -*-
name = 'liyuzhoupan'
password = '123'

def login_test():
count = 0
while count < 3:
_name = input("please input your name:\n")
_password = input("please input your password:\n")
if _name == name and _password == password:
print("welcome name is {_name} ,password {_password} login !".format(_name=_name, _password=password))
break
else:
print("username or password error!")
count = count + 1
print(count)
else:
print("Login times greater than 3")

login_test()

python菜鸟学习: 1.用户登录输入输出的更多相关文章

  1. python 初学习 模拟用户登录

    #!/usr/bin/env python#coding:utf-8''' 2017年8月19日 模拟用户登录,userfile 文件保存字典 用户名,和密码 sorryname 文件保存字典 登录过 ...

  2. Flask学习之五 用户登录

    英文博客地址:http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-v-user-logins 中文翻译地址:http:// ...

  3. Python之简单的用户登录和注册

    # -*- coding: utf-8 -*- # @Time : 2018/7/26 20:16 # @Author : Adam # @File : exam2.py # @Project: ke ...

  4. python用scrapy模拟用户登录

    scrapy模拟登录 关注公众号"轻松学编程"了解更多. 注意:模拟登陆时,必须保证settings.py里的COOKIES_ENABLED(Cookies中间件) 处于开启状态 ...

  5. Python开发之【用户登录锁定】

    用户登录验证,输入密码错误三次,锁定此用户. 将用户信息存入文件 文件内容格式如下: {','login_flag':True} {','login_flag':True} {','login_fla ...

  6. 「Django」rest_framework学习系列-用户登录

    用户POST登录-->后台验证用户名密码-->验证正确返回TOKEN-->验证错误返回错误信息 class UserAPI(APIView): #用户登录类 def post(sel ...

  7. AngularJs学习——模拟用户登录的简单操作

    效果截图:

  8. python小练习--模拟用户登录,(3次重试机会,登录成功展示登录账号密码)

    知识点使用:1.格式化输出的两种方法---% .formate 2.while循环的使用,及跳出循环的两种方法---break(跳出循环体).continue(结束本次循环,继续下次循环) 3.if条 ...

  9. Python爬虫学习——使用Cookie登录新浪微博

    1.首先在浏览器中进入WAP版微博的网址,因为手机版微博的内容较为简洁,方便后续使用正则表达式或者beautifulSoup等工具对所需要内容进行过滤 https://login.weibo.cn/l ...

  10. python菜鸟学习心得

    禁忌:学习没精力,就是没精打采.没有热情. 禁忌:学习一半,然后,放在一边. 禁忌:不要东一榔头,西一棒锤. 禁忌:学习要用心. 激情是动力,专注是效率 每次学习都是绕着网络转了一圈.还是要一步一个脚 ...

随机推荐

  1. Windows 分辨率改变引起WPF的适应问题

    系统分辨率变化,全屏WPF的UI出现没更新和白底之类的现象记录. 您可以使用SystemParameters.WorkArea.最初设置MainWindow的MaxHeight. 在MainWindo ...

  2. ORACLE 失效索引重建

    -- 获取失效索引 SELECT * FROM USER_INDEXES WHERE TABLE_NAME IN ('表名') AND STATUS = 'UNUSABLE'; -- 重建语法alte ...

  3. 最新go语言学习教程

    go语言学习教程 集合了连接go routine.go连接redis.go连接kafka等示例,所有代码均经过实践,可以直接使用 https://github.com/fastbpmn/go-stud ...

  4. js获取对象数组中指定属性值的新数据

    例: let arr = [ {name: "name1", age: "1",type:"1"}, {name: "name2& ...

  5. 查看oracle死锁

    select A.sid, b.serial#, decode(A.type, 'MR', 'Media Recovery', 'RT','Redo Thread', 'UN','User Name' ...

  6. c# reflect里面的getValue()参数

    Type ty = t.GetType(); PropertyInfo[] PropertyInfo = ty.GetProperties(); string Typename = typeof(T) ...

  7. WPF materialDesign 锁屏后界面卡死问题解决

    materialDesign的一个缓存机制问题,在xaml文件中Window属性添加一行: materialDesign:ShadowAssist.CacheMode="{x:Null}&q ...

  8. eKuiper 1.8.0 发布:零代码实现图像/视频流的实时 AI 推理

    LF Edge eKuiper 是 Golang 实现的轻量级物联网边缘分析.流式处理开源软件,可以运行在各类资源受限的边缘设备上.eKuiper 的主要目标是在边缘端提供一个流媒体软件框架(类似于 ...

  9. 阿里云IPSec的一些问题

    1.阿里云IPSec无法进行多段连接单个IPSec连接 解决方案  在阿里云端需要如下操作 1.单个VPN网关下创建多个IPSec连接  连接属性一致  使用兴趣流模式.打开nat转换.  2段对2段 ...

  10. python bottle小记

    # coding=utf-8import bottle @bottle.route('/url/url', method=['GET','POST'])def big_data(): # 获取请求参数 ...