0  250275  250283  250289  250293  250299  250301  250305  250311  250313  250319  250325  250329  250331  250335  250341  250343  250349  250353  250355  250359  250361  250365  250367  250369  250370  250371  250373  250374  250375  250377  250379  250383  250385  250389  250391  250395  250401  250403  250409  250413  250415  250419  250425  250431  250433  250439  250443  250445  250451  250455  250461  250469  447090 

第二节(共15小题;每小题1.5分,满分22.5分)

请听下面5段对话或独白,选出最佳选项。

请听第6段材料,回答第6至8题

6. What are the speakers talking about?

A. A flight timetable.

B. The way to Union Street.

C. Hiring a taxi.

7. Where is the woman going on Saturday?

A. To Garden Hotel.       B. To the airport.

C. To the taxi company.

8. How much does the woman have to pay?

A.60.            B.16.           C.20.

请听第7段材料,回答第9至11题。

9. Where does the woman come from?

A. Zhongshan Medical College.

B. The Sixth Club.

C. Beijing University.

10. Why is the woman going to the meeting?

A. The professor is her teacher.

B. She is interested in the topic.

C. The professor is from a famous university.

11. When will the meeting possibly end according to the man?

A. 12 o’clock at noon.

B. At 2:20 pm.

C. At 3:45 pm.

请听第8段材料,回答第12至14题。

12. What does the man think of his roommate?

A. Very friendly.              B. Not honest.

C. Taking advantage of him.

13. What does the man expect his roommate to do?

A. Treat him to a meal in the restaurant.

B. Pay half the grocery bill.

C. Have three meals a day with him.

14. What should the man do according to the woman?

A. Have a heart-to-heart talk with his roommate.

B. Tell his roommate to move out.

C. Let his roommate outstay his welcome.

请听第9段材料,回答第15至17题。

15. Why does Josh Ryan speak to Professor Murphy?

A. He wants to change classes.

B. He wants additional reading on a topic.

C. He has some problems with the readings.

16. What does Professor Murphy teach?

A. Writing.           B. Politics.       C. Classics.

17. What can be inferred about Josh?

A. He will major in philosophy.

B. He will graduate in a few months.

C. He enjoys Professor Murphy’s class.

请听第10段材料,回答第18至20题。

18. What can you know from the text?

A. Few people know about the importance of reading speed.

B. People reading a book too rapidly can’t fully understand the important ideas.

C. A slower reader can read the home town newspaper quickly only for fun.

19. What should be read rapidly according to the speaker?

A. All kinds of textbooks.

B. Directions for planting a garden.

C. Enjoyable novels.

20. What is the key rule you should keep in mind about the speed of reading?

A. Adapt your reading speed to your needs.

B. Keep changing the speed of your reading.

C. Read everything as rapidly as possible.

试题详情

第一节(共5小题;每小题1.5分,满分7.5分)

请听下面5段对话,选出最佳选项。

1. Whom is the man speaking to?

A. A conductor.       B. A policewoman.      C. A passenger.

2. How many days will the woman be on travel?

A. 15.            B. 10.              C. 7.

3. What is the man going to do?

A. Do some shopping. B. Visit the museum.  C. Buy some bags.

4. Where is the party going to be held?

A. At the woman’s.    B. In the classroom.  C. At Jack’s.

5. What does the man think of the price the woman offers?

A. It is the lowest price here.

B. It is higher than that in the ad.

C. It is quite reasonable.

试题详情

4. 1,1,2,3,5,8,13,…这一列数的规律是:第1、第2个数是1,从第3个数起,该数是其前面2个数之和,试用循环语句描述计算这列数中前20个数之和的算法.

[解]

a←1

b←1

S←2

For n From 3 To 20

c←a+b

S←S+c

a←b

b←c

End For

Print S

试题详情

3.2000年我国人口数约为13亿,如果每年的人口自然增长率为15‰,那么多少年后我国人口数将达到或超过15亿?

   这个问题可通过循环方式计算完成,即每一次在原有的基础上增加15‰,直到达到或超过15亿,再记下循环次数,试用循环语句表示这一过程。

[解]

s←1300000000

i←0

while s≤1500000000

s←s×(1+0.015)

i←i+1

End While

Print i

试题详情

2.我们曾研究过问题   >2 004,试用“While”语句描述这一问题的算法过程。

[解]

S←0

I←1

While S≤2004

S←S+I

I←I+1

End While

Print I

试题详情

1.下面的伪代码中,“For”语句的循环体是__________________________.

[解]循环体是

S←2S+3,

If S>20 Then 

S←S-20

End If

试题详情

1.问题:

设计计算的一个算法。

[分析]将上述表达式看成49个乘法,用公式表示为:

S←S×I

S初始为1,I为1,将每次的乘积都赋予S,I从1到99,每次增加2,公式S←S×I会被重复执行,这种执行过程可用循环结构表示。

算法一:

S1  S←1;

S2  I←1;

S3  I←I+2;

S4  S←S×I;

S5  如果I小于99,那么转S3;

S6  输出S

上述算法用流程图表示如下:

[说明]算法一是先执行后判断的直到型循环结构,常用“Do”语句表示,我们不再学习。

 

算法二:

S1  S←1;

S2  I←1;

S3  当I不大于99时转S4,否则转S6;

S4  S←S×I;

S5  I←I+2;

S6  输出S

上述算法用流程表示如图所示:

[说明]算法二可以理解为:当I>99时, 才循环执行S4和S5两步,这种先判断后执行的循环结构我们称为当型循环,常用“While”语句和“For”语句表示,其中“While语句”可以用如下代码表示:

用伪代码表示为:

S←1

I←1

While I≤99

  S←S×I

  I←I+2

End While

Print S

由此可见,同一个问题可以用不同的循环方式来解决,直到型循环和当型循环的控制条件是不同的,请注意流程图中判断分支的流向条件。

在算法二的伪代码中,可以看成I从1到99,每次增加2,用For语句写成I From 1 To 99 Step 2,“Step 2”意为I每次增加2。写成一般形式为:

 

注意黑体字部分是For循环语句的关键词,在“For”和“End For”之间的步骤称为循环体,如果省略“Step 2”,那么循环时I的值默认增加1。

上述问题用For循环语句的伪代码可以表示为:

S←1

For I From 1 To 99 Step 2

S←S×I

End For

Print S

[总结]当循环的次数确定时,我们通常用For循环语句,而当循环的次数不确定时,我们通常用While循环语句,这两种语句都是前测试语句,即先判断后执行。若初始条件不成立,则一次也不执行循环体中的内容,任何一种需要重复处理的问题都可以用这种前测试循环来实现。

[经典范例]

例1  分别用While语句和For语句写出求1+2+3+…+100的和的一个算法。

[解]用伪代码表示为:

S←0

For I From 1 To 100

S←S+I

End For

Print S

或:

S←0

  While I≤100

   S←S+I

   I←I+1

  End While

  Print S

[注意]在累加的算法中,S的初始值一般设为0,在累乘的算法中,S的初始值一般设为1,为什么?

例2  问题:将前面的问题改为

   >1 0000,那么,如何寻找满足条件的最小整数呢?请用伪代码写出一个算法。

[分析]这个问题中,因为不知道循环需要进行的次数,所以不能用For循环语句。

[解]算法:

S1  S←1;

S2  I←1;

S3  如果S≤10000,那么I←I+2,S←S×I,重复S3;

S4  输出I。

上述算法可以理解为:当S≤10000时,循环执行S3。

伪代码如下:

  S←1;

  I←1

While S≤10000

S←S×I

I←I+2

End While

Print I

在“For”语句中,I的变化是通过“Step”设置的,在程序运行时自动改变,所以循环体中没有如“I←I+2”这样的语句,而在“While”语句中,则需要手工编写如“I←I+2”这样的代码以控制程序的运行,避免出现“死循环”。

例3  抛掷一枚硬币时,既可能出现正面,也可能出现反面,预先做出确定的判断是不可能的,但是假如硬币的质量均匀,那么当抛掷次数很多时,出现正、反面的机率都应接近于50%,试设计一个循环语句模拟抛掷硬币的过程,并计算抛掷中出现正面的机率。

分析:抛掷硬币的过程实际上是一个不断重复的地做同一件事情的过程,这样的过程我们可以通过循环语句模拟。

在程序语言中,有一个随机函数“Rnd”,它能产生0与1之间的随机数,这样,我们可以用大于0.5的随机数表示出现正面,不大于0.5的随机数表示出现反面,

[解]用伪代码表示为:

S←0   {求累计和,初始值设为0}

  Read n

  For I From 1 To n

   If Rnd>0.5 Then S←S+1

  End For

  Print 出现正面的频率为

{单行条件语句不需要结束标志“End If”}

 

追踪训练

试题详情

2.理解并掌握循环语句在计算机程序语言中的作用,掌握两种循环语句应用的实例:数列求和、求积。

[课堂互动]

自学评价

试题详情

1.正确理解循环语句的概念,并掌握其结构;会应用循环语句编写程序;并能进行简单的综合应用。

试题详情

5.到银行办理个人异地汇款(不超过100万)时,银行要收取一定的手续费,汇款不超过100元,收取1元手续费;超过100元但不超过5 000元,汇款额的1%收取;超过5 000元,一律收取50元手续费。试用条件语句描述汇款额为x(元)时,银行收取的手续费y(元)的算法过程,并画出流程图。

[解]Read x  (x≤1000000)

If x≤100 Then

  y←1

Else If x≤5000 Then

y←0.01x

Else

y←50

End If

Print y

流程图略.

试题详情


同步练习册答案