试题 试卷
题型:单选题 题类: 难易度:普通
浙江省钱塘联盟2023-2024学年高二上学期信息技术期中联考试卷
s="Dijob 2023" s1=""
for i in range(0,len(s)):
c=s[i]
if "a"<=c<="z" or "A"<=c<="Z":
s1=s1+chr(ord(c)-1)
else:
s1=c+s1 print(s1)
程序运行后,输出的结果是 ( )
实现上述功能的VB程序如下,请回答下列问题:
from math import *
def isPrime(x): # 判断是否为素数
i = 2
while :
if x % i == 0:
return ①
i += 1
return True
count = 0
for p in range(2, 50): # 判断否为梅森素数
if ② :
m = ③
if isPrime(m) == True:
print(m)
count += 1
print("2的50次方减1以内的梅森素数共有:" + ④ + "个")
比如:仓库存储情况列表a=["0","A","A","B","B","A","0","0","0"],其中"0"表示空位,"A","B"表示位置上货物种类,现需从中取出一件B货物,则应从右侧取出,取完后,仓库存储列表更新为a=["0","A","A","B","A","0","0","0","0"]。
试题篮