题目内容

若想输出 100 以内所有的偶数,_____处应填入()。01 for i in range(__________):02 print(i)

A. 2,100
B. 0,2,100
C. 0,100,2
D. 2,100,0

查看答案
更多问题

判断下列代码的输出结果为()?for i in range(10):if i % 3 == 0:continueprint(i, end="")if i > 8:breakelse:print("循环结束")

A. 1 2 4 5 7 8
B. 1 2 4 5 6 7 8
C. 0 1 2 4 5 6 7 8
D. 1 2

学 Python,告别“不浪漫罪名”!女朋友想要星星,小明就给她星星,女朋友收到后非常满意。下列哪项是小明写的正确的代码()。

A. number = int(input("How many stars do you want?"))for i in range(1, number):print('*', end=' ')
B. number = int(input("How many stars do you want?"))for i in range(number):print('*', end=' ')
C. number = int(input("How many stars do you want?"))for i in range(number):print('*', end=' ')
D. number = int(input("How many stars do you want?"))for i in range(1, number):print('*', end=' ')

阅读下面的代码,输出结果是()?for i in range(1, 15, 5):print(i, end="")

A. 1515
B. 1234
C. 1611
D. 0

哪个选项不符合下列空白处的语法要求()。for var in ______:print(var)

A. range(0,10)
B. {1;2;3;4;5}
C. “Hello”
D. (1,2,3)

答案查题题库