python的流程控制学习

1 _username= 'haozheyu'
2 _password= '123123'
3 username = input("请输入用户:")
4 password = input("请输入密码:")
5 if _username == username and _password == password :
6     print ("你输入对了")
7 else :
8     print("用户或密码错误 "
9           "invalid username or password")

text第一版

age_of_laochuanzhang = 56
age = int(input("请输入你的年龄:"))
if age_of_laochuanzhang == age :
    print("yes, you got it.")
elif age_of_laochuanzhang > age:
    print("think smaller...")
else:
    print("think bigger!")

text第二版

posted @ 2017-12-19 22:45  听_风~  阅读(188)  评论(1编辑  收藏  举报