1.循环语句
- while循环
- for循环
while 条件:
...
...
...
1.2综合案例
print("欢迎登陆修仙系统")
flag =True
while flag:
user = input("请输入账号:")
password = input("请输入密码:")
if user == "zyj" and password =="123":
print("解锁成功")
flag = False
else:
print("渡劫失败")
1.3 break
break,用于在while循环中帮你终止循环。
标签:...,flag,python06,while,循环,print From: https://www.cnblogs.com/zhangyj213/p/17716150.html