试题 试卷
题型:单选题 题类:常考题 难易度:普通
4.1.1Python的常量和变量-粤教版(2019)高中信息技术必修一练习
s=0
for i in range (1,5):
s=s+i
print("i=",i,"s=",s)
请问右边的程序段运行结束后,
变量x的值为{#blank#}1{#/blank#}
变量y的值为{#blank#}2{#/blank#}
a = a * b
b = a / b
a = a / b
a(i)=i+1
Next i
程序运行后,变量i的值是:( )
Private Sub Text1_Change()
Dim c As Integer, i As Integer
i=0
c = Val(Text1.Text)
Do While c >= 0
c = c - i
i = i + 1
Loop
Text1.Text = Str(c)
End Sub
在文本框输入“6”,执行该程序段后, 其中c >= 0执行的次数是( )
salary=float (input( ))
if salary<=5000:
tax=0
elif salary<=7000:
tax=(salary-5000)*0.1
elif salary<=10000:
tax=200+(salary-7000)*0.2
else:
tax=800+(salary-10000)*0.4
print(salary-tax)
flag=False:s="ShanShui2020!"
For i=1 To Len(s)
ch=Mid(s,i,1)
If Not(ch〉="0"And ch<="9")And Not flag Then
t=ch+t
End If
flag=Not flag
Text1.Text=t
执行完以上程序段后,文本框text1中的内容为( )
试题篮