score=int (input ("请输入考试成绩"))
if score>=90:
print("A")
elif score>=80:
print("B")
elif score>=70:
print("C")
elif score>=60:
print("D")
else:
print("E")
请利用列表实现程序的功能,在划线处将程序补充完整。
mc=(input (“请输入运动会项目名词(1~6):”)) #输入名次,转化为整型
1st=[7,5,4,3,2,1] #定义一个得分列表
if mc>=1 and mc<=6 : #名次在1-6名之间,索引位置
df= #根据索引取列表中相应的成绩
print(“项目得分为:”, )
else:
print(“输入的名次不在[1~6]范围!”)
Dim i As Integer, a As Integer
i=6
a=6
If i <6 Then
a = a +4
Else
a = a -4
End If
输入一个成绩,判断该成绩属于“优秀”、“良好”、“及格”还是“不及格”。
Private Sub Command1_Click( )
Dim x As Integer
x= (Text1.Text)
Select Case x
Text2.Text=“优秀”
Case x≧75
Case Else
Text2.Text=“不及格”
End Select
End Sub
If a>5 then
if b<4 then
c=a-b
else
c=b-a
End if
Else
if b>3 then
c=a*b
else
c= a mod b
End if
End if
若x中的值为2,4,6,则打印“x的值为2,4,6”;
若x中的值为10到20之间的数,则打印“x的值为10~20”;
若x中的值为大于20的数,则打印“x 的值大于20”;
否则,打印“x不在范围内”;
Private Sub Command1_Click()
x = Val(Text1.Text)
Select Case x
Case
Print "x的值为2,4,6"
Case
Print "x的值为10~20"
Case
Print "x的值大于20"
Print "x不在范围内"
End Select
End Sub
height=input('你的身高是多少米:')
height=float(height)
weight =input('你的体重是多少KG:')
weight =float(weight)
BMI=weight/(height*height)
if BMI>=24.9:
print('肥胖')
① BMI<24.9 ② BMI>=18.5:
print('正常')
else:
print('偏瘦')
|
G=int(input(‘请输入原始成绩:’)) If print(‘Great’) elif G<85 and G>=70: print(‘Good’)
print(‘Medium’) else: print(‘Bad’) |
Private Sub Command1_Click( )
Dim s, j As Single
s=
For j=1 to 50
If Then
s=s*j
Else
s=
End if
Next j
print “s=”:s
End Sub
试在横线处填写适当的内容,使程序得到相应的计算结果。

请把以下选项填在对应的序号处①、②、③
A.暴雨红色预警信号是否生效
B.正常回校上课
C.学生停课在家自主学习
m=19
if m>=30 or m<20:
print(m)
x=3
Select Case x
Case 5
Print "优秀"
Case 4
Print "良好"
Case 3
Print "通过"
Case Else
Print "不通过"
End Select
a=3
b=5
if a==b:
print(b)
else:
print(a)
a=int(input("请输入买苹果的斤数:")
if :
s=10*a
else:
s=8*a
print("苹果费用:"+str(s))
t=float (input("请输入停车时长:"))
if t<=1:
print("停车时长"+str(t)+",免费停车")
elif t<=3:
print("停车时长"+str(t)+",收费5元")
print("停车时长"+str(t)+",收费10元")
else:
print("停车时长"+str(t)+",收费15元")
import math
for num in range(100,1000):
![]()
if num==pow(gw,3)+pow(sw,3)+pow(bw,3): #pow(x,y)函数返回xy的值
print(num)
上述程序段中加框处应该填入的代码段是( )
B .
C .
D .
a=int(input("请输入a:"))
if a<0:
y=-a
else:
y=a
print(y)
输入: 2022
输出结果为
输入: -3
输出结果为
a=int(input("请输入你的年龄: "))
if a<=3:
print("没到买票年龄")
elif a>=4 and a<12:
print("请购买儿童票")
else:
print("请购买全价票")

