问题 单项选择题 共用题干题

在设计完成以后,实现阶段的初期确定算法是解决问题的关键步骤之一。算法的计算工作量的大小和实现算法所需要的存储空间的多少,分别称为计算的__(1)__和__(2)__。编写程序的时候,__(3)__和__(4)__是应采纳的原则之一。__(5)__是调试程序的主要工作之一。

空白(5)处应选择()

A.调度

B.证明程序正确

C.人员安排

D.排错

答案

参考答案:D

解析:

通常用来衡量算法的复杂度的标准有两个,是时间复杂度和空间复杂度。时间复杂度就是指完成该算法所要花费的工作量或者说运行的时间数量级;空间复杂度是指 算法所要使用的变量的存储空间花费为多大。编写程序实现算法的时候,程序的结构化十分重要,包括对程序进行分模块处理。在实现中应该尽量使用有意义的变量 名,这样对于变量的用途可以使用变量名来显现,有助于维护的时候重读代码时对于变量的理解。调试程序与测试相似,是不能用来证明程序一定是无错的,只能尽 可能多的找出错误,修改错误。

阅读理解

阅读理解

     Christopher Thomas, 27, was a writer by night and a teacher by day when he noticed he was always

tired and was losing weight fast. Diagnosed with diabetes(糖尿病), Thomas would need to inject himself with insulin(胰岛素) three times a day for the rest of his life or risk nerve damage, blindness, and even

death. And if that weren't bad enough, he had no health insurance.

     After a month of feeling upset, Thomas decided he'd better find a way to fight back. He left Canton,

Michigan for New York, got a job waiting tables, nicknamed himself the Diabetic Rockstar, and created

diabeticrockstar.com, a free online community for diabetics and their loved ones-a place where over

1,100 people share personal stories, information, and resources.

     Jason Swencki's son, Kody, was diagnosed with diabetes at six. Father and son visit the online

children's forums(论坛) together most evenings. "Kody gets so excited, writing to kids from all over,"

says Swencki, one of the site's volunteers. "They know what he's going through, so he doesn't feel alone."

     Kody is anything but alone: Diabetes is now the seventh leading cause of death in the United States,

with 24 million diagnosed cases. And more people are being diagnosed at younger ages.

      These days, Thomas's main focus is his charity(慈善机构), Fight It, which provides medicines and

supplies to people-225 to date-who can't afford a diabetic's huge expenses. Fightit.org has raised about

$ 23,000-in products and in cash. In May, Thomas will hold the first annual Diabetic Rockstar Festival

in the Caribbean.

      Even with a staff of 22 volunteers, Thomas often devotes up to 50 hours a week to his cause, while

still doing his fulltime job waiting tables. "Of the diabetes charities out there, most are putting money into

finding a cure," says Bentley Gubar, one of Rockstar's original members. "But Christopher is the only

person I know saying people need help now."

1. Which of the following is TRUE of Christopher Thomas?

A. He needs to go to the doctor every day.

B. He studies the leading cause of diabetes.

C. He has a positive attitude to this disease.

D. He encourages diabetics by writing articles.

2. Diabeticrockstar.com was created for ________.

A. diabetics to communicate

B. volunteers to find jobs

C. children to amuse themselves

D. rock stars to share resources

3. According to the text, Kody ________.

A. feels lonely because of his illness

B. benefits from diabeticrockstar.com

C. helps create the online kid's forums

D. writes children's stories online

4. What can we learn about Fight It?

A. It helps the diabetics in financial difficulties.

B. It organizes parties for volunteer once a year.

C. It offers less expensive medicine to diabetics.

D. It owns a wellknown medical website.

5. The last paragraph suggests that Thomas ________.

A. works fulltime in a diabetes charity

B. employs 22 people for his website

C. helps diabetics in his own way

D. tries to find a cure for diabetes

单项选择题