2019-10-14日笔记

Posted on 2019-10-13 23:33  明俊  阅读(123)  评论(0)    收藏  举报
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文件输入为字符串类型

 

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3