标签:break print while cmd run usr ESS int 三次
#!/usr/bin/env python
#-*- coding:utf-8 -*-
n=0
while True:
if n ==3:
print("尝试太多了")
break
name=input("请输入你的姓名:")
pwd=input("请输入你的密码:")
if name==‘likai‘ and pwd==‘123‘:
print("login successful")
while True:
cmd=input("请输入你的命令:")
if cmd ==‘q‘:
break
print(‘%s is running‘ %cmd)
break
else:
print("账号密码错误")
n+=1
标签:break print while cmd run usr ESS int 三次
原文地址:https://www.cnblogs.com/lucky33/p/10245752.html