# -*- coding: utf-8 -*-
# @Time : 2020/7/25 22:45
# @Author : Breeze
# @FileName: login_while.py
user_name = "Breeze"
password = "123456789" counter = 0
while counter < 3:
get_username = input("请输入用户名:")
get_password = input("请输入密码:")
if get_username == user_name and get_password == password:
print("Welcom %s login...." % user_name)
else:
print("Invalid username or password!")
counter += 1 if counter == 3:
keep_going_choice = input("还想玩吗?[y/n]")
if keep_going_choice == "y":
counter = 0
else:
print("臭不要脸!")

login_while的更多相关文章

随机推荐

  1. 微信小程序-自定义tabbar配置及注意事项

    1.选中要创建tabbar组件的目录,右键选定新建Componen 2.然后编写wxml代码和wxss样式 <cover-view class="tab-bar"> & ...

  2. Cesium测量优化1

    简介:优化绘制点.线,面鼠标位置获取精度.支持3dties,gltf model,以及box等Geometry Entity上的位置拾取. 测试代码 <template> <div ...

  3. apt-get update 报错 Repository ' InRelease' changed its 'Suite' value from 'stable' to 'oldstable'

    问题截图: 解决方案: apt-get update --allow-releaseinfo-change

  4. Posggresql插件Multicorn安装问题总结

    根据官网https://multicorn.readthedocs.io/en/latest/installation.html的安装指南下载安装,关键信息: Postgresql 9.1+ Post ...

  5. 【10】python之条件判断

    Python 条件语句是通过一条或多条语句的执行结果(True 或者 False)来决定执行的代码块. Python中没有switch – case语句,也没有三元运算符. 1.if 语句 Pytho ...

  6. android 集成友盟实现 第三方分享 登录(qq,新浪,微信)

    其实友盟的文档写的非常详细了,在这只是记录一下开发过程中遇到过的坑. 开发流程,先到友盟的官网注册账号创建应用,友盟的文档地址:http://dev.umeng.com/social/android/ ...

  7. 光纤加速卡第410篇:基于XCVU9P+ C6678的40G光纤的加速卡 光纤的加速卡 无线通信

    光纤加速卡第410篇:基于XCVU9P+ C6678的40G光纤的加速卡 光纤的加速卡 无线通信   基于XCVU9P+ C6678的40G光纤的加速卡 一.板卡概述 二.技术指标 •  板卡为自定义 ...

  8. windows环境go安装和goland激活

    1. go环境安装 1.1. go安装包下载 https://golang.google.cn/dl/ https://studygolang.com/dl 1.2. 安装go环境 1.2.1. 点击 ...

  9. PIL画图只有黑白色

    背景 项目上需要对人工标注的图片上的框进行校对,验证有无漏框.错框等问题.尝试使用opencv把框信息画出来,但是中文无法写到图片上,么得办法,只能转战PIL.但是用PIL之后出现部分图画出来的框写出 ...

  10. Git commit时提示错误时 解决办法

    问题描述: * Please tell me who you are.  Run  git config –global user.email "you@example.com"  ...