标签:orm 输入密码 font python基础 oda import 习题 练习题 pass
import datetime
today = datetime.date.today()
username = ‘kelly‘
password = ‘123456‘
num = 0
while num < 3:
user = input(‘请输入用户名:‘)
passw = input(‘请输入密码:‘)
if username == user and password == passw:
print(‘{},欢迎登陆,今天的日期是{},程序结束‘.format(username,today))
break
elif user == ‘‘ or passw == ‘‘:
print(‘用户密码不能为空‘)
else:
print(‘用户名/密码输入错误‘)
num += 1
else:
print(‘失败次数过多‘)
import datetime username = ‘kelly‘ password = ‘123456‘ today = datetime.date.today() for i in range(3): user = input(‘请输入用户名:‘) passw = input(‘请输入密码‘) if user==‘‘ or passw==‘‘: print(‘用户名密码不能为空‘) elif user==username and passw==password: print(‘{},欢迎登陆,今天的日期是{},程序结束‘.format(username,today)) break else: print(‘用户名密码输入错误‘) else: print(‘输入次数过多‘)
标签:orm 输入密码 font python基础 oda import 习题 练习题 pass
原文地址:https://www.cnblogs.com/kelly11/p/11951845.html