这又是哪里出错了呀
count = 10import randam as a
import randam as b
password = (a.randint(1,10),b.randint(1,10))
while count:
passwd = input('请输入密码')
if passwd == password:
print('密码正确')
break
elif "*" in passwd:
print('密码中不能含有"*"号!您还有',count,'次机会')
continue
else:
print('密码错误!您还有'count-1'次机会')
count -= 1
运行后报错,估计是第四行的问题,但我也不知道是怎么回事,兄弟们,来帮帮我吧{:10_266:} count = 10
import random as a
password = (a.randint(1,10),a.randint(1,10))
while count:
passwd = input('请输入密码')
if passwd == password:
print('密码正确')
break
elif "*" in passwd:
print('密码中不能含有"*"号!您还有',count,'次机会')
continue
else:
print('密码错误!您还有'count-1'次机会')
count -= 1 青出于蓝 发表于 2022-7-30 21:03
谢啦{:10_257:}
页:
[1]