• 2022-06-11
    for i in range(4):if i%2==0:print(i)breakprint(i)
    A: 00
    B: 01
    C: 22
    D: 02
  • A

    内容

    • 0

      已知字符“▼”的Unicode码位为“25BC”。下面的代码,能够正确输出如下图形的是( )。[img=116x123]18032de2fb12d29.png[/img]知识点:for循环。 A: for i in range(4, 0, -1): print(" "*(4-i)+"\u25BC"*(2*i-1)) B: for i in range(4): print(" "*i+"\u25BC"*(7-2*i)) C: for i in range(4): for j in range(i): print(" ",end="") for j in range(7-2*i): print("\u25BC",end="") print() D: for i in range(4): print(" "*(4-i)+"\u25BC"*(2*i-1))

    • 1

      (多选)已知字符“▼”的Unicode码位为“25BC”。下面的代码,能够正确输出如下图形的是( )。[img=116x123]17e0c817ca58112.png[/img]知识点:for循环。 A: for i in range(4):for j in range(i):print(" ",end="")for j in range(7-2*i):print("\u25BC",end="")print() B: for i in range(4, 0, -1):print(" "*(4-i)+"\u25BC"*(2*i-1)) C: for i in range(4):print(" "*i+"\u25BC"*(7-2*i)) D: for i in range(4):print(" "*(4-i)+"\u25BC"*(2*i-1))

    • 2

      将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

    • 3

      下列语句的执行结果是: for i in range(10): if i % 4 == 0: print(i) continue break A: 0 B: 2 C: 4 D: 8

    • 4

      下列程序段的输出结果是___________。for i in range(5):if i%2 == 0:print(i)else:print(i)