• 2022-05-30
    编写一段代码使用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)