试题 试卷
题型:填空题 题类:常考题 难易度:普通
【bj】云南省临沧市沧源县2020-2021学年高一上学期信息技术期末考试试卷
a=6
b=18
c=26
if a>=b and a>=c:
max=a
elif b>=a and b>=c:
max=b
elif c>=a and c>=b:
max=c
print (max)
该程序段运行后,输出的max的值为。
Dim a(1 To 5) As Integer
a(1) = 1
For i = 2 To 5
a(i) = Int(Rnd * 5) + 1
If a(i) Mod 2 = 0 Then
a(i) = a(i) + i
Else
a(i) = a(i) + a(i - 1)
End If
Next i
a(1)~a(5)的值不可能的是( )
i=1:j=2:n=10
Do While i<n
If a(i)>=a(j) Then mc(i)=mc(i)+1
If a(i)<=a(j) Then mc(j)=mc(j)+1
j=j+1
If j>n then i=i+1:j=i+1
For=1 To n
List1.AddItem“得分为”+Str (a(i))+“名次为”+Str( )
划线处应填写的语句为( )
def f(x):
if x<=1 :
return 2
else:
return f(x-1)*2+f(x-2)
执行语句 v=f(3),v 的值为( )
k = 3
cj,Sum = 0,0,0
for i in range(len(s)):
ch = s[i]
if '0' <= ch <= '9':
c = c * 10 + int(ch)
j += 1
if j == k:
Sum += c
j,c = 0,0
字符串 s 为"wz500ai2024ok102"时,执行该程序段后,Sum 的值为( )
s = ['12','22','23','31','123','224']
res =s[0]
for i in range(1,len(s)):
if s[i] >= res:
res =s[i]
print(res)
执行上述程序后,输出的结果是( )
s="78.166.97.89."
n=len(s);c="";max=""
for i in range(n):
if "0"<=s[i]<="9":
c=s[i]+c
if c>max:
c=""
print(max)
执行该程序后,输出的结果是( )
试题篮