问题 单项选择题

在窗体上画一个命令按钮,名称为Command1,然后编写如下程序:
Private Sub Command1_Click()
For i=1 To 2
For j=1 To i
Print String(i,"Hello")
Next j
Print
Next i
End Sub
程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )。

A.H
HH
HH

B.H
HHHH

C.HHHHH
HH
HHHH

D.H

答案

参考答案:A

解析: 分析程序,程序开始循环时i=1,j=1 to 1,Print String(i, "Hello")语句输出一个H,然后执行Print进行换行;当i=2时,j=1 to 2,Print String(i,"Hello")语句精出两行分别为两个HH,然后执行Print换行;当i=3时,退出循环。

单项选择题

Some spiders hunt on the ground, others build webs to trap their food, but the grass water spider catches its prey by running along the surface of the water.

This special water spider lives on the grassy banks of streams where mosquitoes, damsel flies and other insects come to feed and breed.

Although it is one of the largest spiders in New Zealand, it has an unusual ability. It doesn’t disturb the water as it waits for its meal, and there is barely a ripple when it skims across the surface at lightning speed to catch its prey.

Grass water spiders deal swiftly with larger insects like damsel flies by pulling their heads under the water and holding them there until they drown.

After a meal, the grass water spider spends up to half an hour grooming itself. It wipes its eight eyes, brushes its antennae, and takes special care to clean the hairs on its body.

It is the hairs that trap tiny bubbles of air so that the spider can run down a blade of grass and stay underwater for up to an hour when it is frightened. The hairs also keep the spider dry, even underwater.

It is only when the female spider is caring for the young that she does not hunt on the water. After mating, she produces a large egg sac, which she carries around for five weeks. Once the eggs start to hatch, she attaches the sac to some blades of grass or a thistle. She then tears the sac open and releases the tiny spiders into the nursery web.

How does the grass water spider kill its prey()

A. In a web

B. By drowning

C. By poisoning

D. With its antennae

单项选择题 A2型题