下列表达式能判断正整数x是偶数的是( )
A.x%2==0 | B.x/2== 0 | C.x %2==1 | D.x % 2!=0 |
更新时间:2021-04-22 14:46:51
|
【知识点】 典型算法
相似题推荐
选择题
|
容易
(0.94)
【推荐1】有如下Python程序段:
que=[2,4,6,3,8,5,1,7]
n=len(que)
st=[]
tmp=n
while tmp>0:
a=que.pop(0)
if a==tmp:
st.append(a)
tmp-=1
else:
que.append(a)
print(st)
程序段运行后,输出的结果是( )
que=[2,4,6,3,8,5,1,7]
n=len(que)
st=[]
tmp=n
while tmp>0:
a=que.pop(0)
if a==tmp:
st.append(a)
tmp-=1
else:
que.append(a)
print(st)
程序段运行后,输出的结果是( )
A.[8, 7, 6, 5, 4, 3, 2, 1] | B.[1, 2, 3, 4, 5, 6, 7, 8] |
C.[1, 2, 3, 4, 5, 6, 8, 7] | D.[2, 1, 3, 4, 5, 6, 7, 8] |
您最近一年使用:0次
选择题
|
容易
(0.94)
【推荐2】利用下列Python程序打印"******",则横线处应该填( )
for i in__________:
print("*",end="")
for i in__________:
print("*",end="")
A.6 | B.range(1,7) | C.range(1,6) | D.range(7) |
您最近一年使用:0次