试题 试卷
题型:单选题 题类: 难易度:普通
浙江省环大罗山联盟2023-2024学年高二下学期期中考试信息技术试题
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
else:
if j == k:
Sum += c
j,c = 0,0
字符串 s 为"wz500ai2024ok102"时,执行该程序段后,Sum 的值为( )
x=1
y=4
Do While y>4
x=x * y
y=y+1
Loop
Print x
Dim y as Integer, i as integer
y=0
For i=1 To 10 Step 2
Next i
m=0:n=0
For i=1 to 100
If i mod 3="0" then
m=m+1
Else
n=n+1
next i
print m,n
import random
s= input()
k = random.randint( l,len(s)-1)
i=0
while k> 0 and i < len(s)-1:
if s[i]>s[i+1]:
k-= 1
s= s[:i]+s[i+1:]
if i> 0:
i-= 1
i+= 1
if k> 0:
s = s[:len(s)-k]
若输入的s值为“8561324”,则执行该程序,输出s的值不可能为( )
n=int(input("请输入用电量总计:"))
s=0
if n<=150:
s={#blank#}1{#/blank#}*0.4
elif n<=400:
s=({#blank#}2{#/blank#})*0.5+150*0.4
else:
s=(n-400)*{#blank#}3{#/blank#}+250*0.5+150*0.4
print("应交的电费是%.1f" % s)
试题篮