问题 填空题

在n个运动员中选出任意r个人参加比赛,有很多种不同的选法,选法的个数可以用公式(作图)计算,在窗体上设计3个文本框,名称依次是Text1、Text2、Text3。程序运行时在Text1、Text2中分别输入n和r的值,单击Command1按钮即可求出选法的个数,并显示在Text3文本框中,请在空白处填入适当语句使程序完整。
Private Sub Command1_Click()
Dim r As Integer,n As Integer
n=Text1
r=Text2
Text3=fun(n)/(______)/fun(r)
End Sub
Function fun(n As Integer)As long
Dim t As Long
______
For k=1 To n
t=t*k
Next k
fun=t
End Function

答案

参考答案:fun(n)-fun(r) t=1

解析: 本题考查选择VBA程序设计的知识。本题实际上并不复杂,只要分析清楚函数fun的功能就能解决这个问题。我们在函数定义的内部和函数调用的方式上可以看出,函数fun实际上就是求阶乘的函数。因为求阶乘是一个累乘的过程,所以存放累乘积的变量t需要赋初值为1,在调用的时候只需要按照公式调用就可以了。

阅读理解

Teens are more likely to behave badly if their parents expect them to,a new US study has found.

“Parents who believe they are simply being realistic might actually be having a bad effect on their children,” Christy Buchanan,a teacher at Wake Forest University and one of the authors of the study,said. “Bad expectations on the part of both parents and children predict more rebellious (叛逆的) behaviors later on.”

The finding came from a study of more than 250 sixth­ and seventh­graders and their mothers. They were examined at the start of the study and again one year later. If kids’ mothers expected them to take more risks and be more rebellious,higher chances of risky behavior were seen.This_was_also_true when kids had bad expectations of themselves.

“Sometimes parents expect more negative behavior from their children than they should based on the children’s history of behavior,” Buchanan said.Parents shouldn’t be naive (无知的) about the possibility of bad behavior,she said,but it’s also a mistake to think that children who are well­behaved will naturally become rebellious at the age of 13.

“By thinking risk­taking or rebelliousness is normal for teenagers and showing that to their children,parents might add to other messages from society that make teenagers feel that they are strange if they are not willing to take risks or break laws,” she said.“This can mean,for example,that when parents expect teens to drink before they turn 21 or to do other risky behaviors,kids are less likely to refuse to do so later in their lives.”

On the other hand,parents’ expectations that teens can exhibit good behaviors and refuse to behave badly or to take risks could help reduce the possibility of bad behavior,Buchanan said.“As a parent,you should put expectations on your children carefully.”

小题1:The passage is centered around the topic of________.

A.parental rights

B.children’s habits

C.parental education

D.parent­children relationship小题2:What do we know about the study?

A.Only mothers were examined.

B.Participants were examined twice.

C.250 people were examined in the study.

D.Christy Buchanan was the only author of the study.小题3:What does the underlined part “This was also true” in Paragraph 3 refer to?

A.The kids were more likely to take dangerous behavior.

B.The kids would have bad expectations of their parents.

C.The kids were likely to go against their mothers.

D.Mothers expected their kids to behave badly.小题4:Children may be more rebellious if________.

A.they know parents think risk­taking is normal

B.parents put little expectation on them

C.they behave well before they turn 13

D.they are asked not to take risks小题5:What might be the most suitable title for the passage?

A.Risk­taking is normal for teens.

B.Why are my teens behaving badly?

C.Don’t expect too much from your teens.

D.Bad expectations lead to bad­behaving teens.

单项选择题