2019-10-14日笔记

pyt
print("我爱中国")
ID = input('请输入那你的ID')
mima = input('请输入那你的密码')
print('我的ID是'+ID,'我的密码是'+mima+'谢谢')

if 5 > 4:
    print("完美")
cont = 0
flag = 0
while cont < 100: cont = cont + 1 flag = cont + flag print(flag) 1-2+3-4...99的和 cont = 0 b = 0 while cont <100: cont = cont + 1 if cont%2==1: b = b - cont else: b = b + cont print(b) '''
输入三次不正确被锁定:
ID = 222
pss = 333
conut = 0
while conut <3:
    conut += 1
    a = input("请输入那你的ID")
    b = input("请输入那你的密码")
    if str(pss) == b and str(ID) == a:
        print("密码正确")
        break
    elif conut == 3:
        print("三次输错程序已被锁定")
    else:print("错误")

input文件输入为字符串类型

猜你喜欢

转载自www.cnblogs.com/LMJlmj/p/11669069.html