for i in range(4): if i%2==0: print(i) break print(i) 结果是
举一反三
- for i in range(1,5): if i%2==0: print(i) break
- 以下代码的输出结果是______。 for i in range(1,6): if i%4 == 0: break else: print(i,end =",")
- 下列语句的执行结果是: for i in range(10): if i % 4 == 0: print(i) continue break A: 0 B: 2 C: 4 D: 8
- 下列程序段的输出结果是___________。for i in range(5):if i%2 == 0:print(i)else:print(i)
- 编写一段代码使用for循环输出1~10之内的奇数,以下哪些选项的结果是正确的?( ) A: for i in range(10): if i % 2 == 1: print(i) B: for i in range(9): if i % 2 == 0: print(i) C: for i in range(11): if i % 2 == 1: print(i) D: for i in range(12): if i % 2 = 0: print(i)