试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙教版(2020)初中信息技术八年级上册第三单元第12课 Python的函数 同步练习
1)def factoria1(n): #求n!
2) s=1
3) for i in range(2,n+1)::
4) s=s*i
5) return s
6)print(factorial(4))
Private Sub Form_Click()
Dim s As Single
Dim i As Integer
s ={#blank#}1{#/blank#}
For i = 1 To{#blank#}2{#/blank#}Step 1
s ={#blank#}3{#/blank#}
Next i
Print "s="; s
End Sub
s='t1Hr2a3'
s1='' ; s2=''; i = 0
while i < len(s):
if '0'<=s[i]<='9':
s1 = s1 + s[i]
elif 'a'<=s[i]<='z':
s2 = s[i] + s2
i = i + 1
ans = s2 + s1
print(ans)
程序执行后,输出的结果是( )
x = 0
while x < 50:
x = (x + 2) * (x + 3)
运行后,x的值为( )
i = 0
while i <10:
print("I love Python!")
i = i + 2
试题篮