题干


      Many children act in TV shows. They work several hours every day, so they can not go to regular school. How do they get an education?

     In Hollywood, many TV shows are made. About forty teachers give lessons to the children in the shows. They teach wherever their pupils are working. The teachers’job is very important. They are responsible(负责) for making sure that the children work only the permitted(允许) hours each week. They are also responsible for making sure that children learn the required subjects. They make sure, too, that the children get enough rest and play, along with their education.

     Children actors are required to attend classes twenty hours each week. California law says they must be taught from September to June. If they do not make much progress in school, they are not permitted to continue working in TV shows. TV children are usually good pupils, and most of their teachers like this special kind of work. Their classes are held in some wonderful places. Sometimes the “classroom”is a Mississippi riverboat, and sometimes it is the inside of a spaceship. Often the pupils become famous TV or movie stars.

上一题 下一题 0.0难度 选择题 更新时间:2017-10-13 08:12:21

答案(点此获取答案解析)

同类题5

某超市举行VIP客户积分换购活动,VIP客户根据卡内积分多少可换取不同额度的代金券。假设VIP客户共有n名,VIP卡内积分存放在数据库“customer.accdb”的Integral表中,换购活动的VB程序代码如下,程序运行时界面如图所示。工作人员在文本框Text1中输入VIP卡号后,单击“换购”按钮Command1,在文本框Text2中输出VIP客户的积分数,在标签Label3中显示可以换购的代金券额度,积分清零。按此要求编写程序如下, 但加框处代码有错,请改正。

Dim ID( ) As String    '用于存放客户卡号

Dim total( ) As Long      '用于存放积分数

Dim sc As Long                  'VIP客户人数

Dim jf As Long                  '积分数


Private Sub Command1Click( )

  Dim k As String                '客户卡号

  Dim q As Long               '代金券额度

  Dim i As Long

  k = Text1.Text

  For i = 1 To sc     ’顺序查找

      If ID(i) = k Then

          jf = total(i)     

          cash(jf) = q               ’ ①

          Exit For

      End If

                                     ’ ②

      Label3.Caption = “您可换购的代金券总额为:”+ Str(q) + “元”

    Next i

  End If

End Sub


' cash函数用于计算VIP客户可换购的代金券额度

Function cash(jf As Long) As Long

  If jf >= 2000 And jf <= 20000 Then

       Cash = jf\2000*10

ElseIf jf > 20000 And jf <= 50000 Then

       Cash = jf\2000*11

ElseIf jf > 50000 And jf <= 100000 Then

       Cash = jf\2000*12

ElseIf jf > 100000 And jf <= 150000 Then

       Cash = jf\2000*13

ElseIf jf > 150000 Then

       Cash = jf\2000*14

End If

End Function


Private Sub FormLoad()

   Dim conn As New ADODB.Connection, rs As New ADODB.Recordset

   Dim intSQL As Long

   conn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + App.Path + "\ customer.accdb"

    conn.Open

   intSQL = "SELECT score  FROM Integral" 

     Set rs.ActiveConnection = conn

     rs.CursorType = adOpenStatic

     rs.Open intSQL

     sc = 0

     Do While Not rs.EOF

       sc = sc + 1

       total(sc) = rs.Fields("score")

       rs.MoveNext

     Loop

rs.Close

     conn.Close

     Set rs = Nothing

     Set conn = Nothing

End Sub