将300~400不能被3整除的数输出。下列哪段代码正确
A: for i in range (300,401):if i%3==0 continue print i
B: for i in range (299,401):print i, if i%3==0 continue print i
C: for i in range (300,400):if i%3==0 continue print i
D: for i in range (301,401): if i%3==0 continue print i
A: for i in range (300,401):if i%3==0 continue print i
B: for i in range (299,401):print i, if i%3==0 continue print i
C: for i in range (300,400):if i%3==0 continue print i
D: for i in range (301,401): if i%3==0 continue print i
举一反三
- for i in range(1, 3): for j in range(1, 3): if i * j <; 2: continue print i * j
- 下列选项中,能找出三位数中,所有个位数字是9并且是3的倍数的数的代码是( )。 A: for i in range(100,1000): if i%10=9 and i%3=0: print(i,end=' ') B: for i in range(100,1000): if i//10==9 and i//3==0: print(i,end=' ') C: for i in range(100,1000): if i%10==9 and i%3==0: print(i,end=' ') D: for i in range(100,1000): if i%10==9 and i%3==0: print(i,end=' ')
- 阅读下面Python代码,选择正确输出结果:() for i in range(5): if i == 3: continue print(i,end=" ") continue print(i,end=" ") A: 0 1 2 3 4 5 B: 0 1 2 3 4 C: 2000 1 2 D: 0 1 2 4
- 下面代码中输出结果为3,2,1三个数字的有()。 A: alist=[3,2,1] for i in alist: print(i) B: i=3 while i>0: print(i) i=i-1 C: for i in range(3,0,-1): print(i) D: for i in range(3): print(i) E: i=1 while i<3: print(i) i=i+1
- 智慧职教: 以下代码的输出结果为: for i in range(10): if i%2 != 0: continue print(i)