第九讲第九讲!!!!!
七八是一起的 所以就是第九了。
0: 5次 0到10以2为间隔。
1:目测 报错
2:break 跳出这个循环,不进来了。continue ,跳一轮,下轮继续。
3:列表,清单
4:0到9好像是
5:2,3
6:无限循环
7:直接打印
8
password='str1111'
count=3
while count>0:
inpass=input('请输入密码')
if inpass==password :
print("密码正确")
break
elif '*' in inpass :
print("密码错误,还有%d次机会"%count)
else:
count-=1
print("密码错误,还有%d次机会"%count)
9:
for i in range(100,1000):
a=int(i/100)
b=int((i%100)/10)
c=int((i%10))
if i==a**3+b**3+c**3 :
print("%d是水仙花数"%i)
,10:
for red in range(0,4):
for yellow in range(0,4):
for blue in range(0,7):
if red+yellow+blue==8:
print('red=%d,yellow=%d,blue=%d'%(red,yellow,blue))
剪枝是不可能剪枝的,这辈子都不可能剪枝的!

浙公网安备 33010602011771号