if语句,while循环,for循环
if语句: 分支结构,选择结构 # Author:Huan import getpass #引入密文密码 _username = 'Huan' _password = 'abc' username = input("name:") #password = getpass.getpass("password:") password = input("password:") if _username == username and _password == password: print("Welcome user {name} login...".format(name=username)) else: print("Invaild username or password") print(username,password) while循环: 基于某种条件循环到结束。 # Author:Huan age_of_huan = 26 count = 0 while count < 3: guess_age = int(input("guess age:")) if guess_age == age_of_huan: print("yes,yo1u got it.") break elif guess_age > age_of_huan: print("think smaller...