问题 单项选择题

在窗体中有一个名称为run1的命令按钮,单击该按钮从键盘接收学生成绩,如果输入的成绩不在0~100分之间,则要求重新输入;如果输入的成绩正确,则进入后续程序处理。run1命令按钮的Click的事件代码如下: Private Sub run1_Click()Dim flag As Boolcanresult=0flag=TrueDo While flagresult=Val(InputBox("请输入学生成绩:","输入"))If result>=0 And result<=100 Then ____________Else MsgBox “成绩输入错误,请重新输入”End IfLoopRein ’成绩输入正确后的程序代码略 End Sub 程序中有一空白处,需要填入一条语句使程序完成其功能。下列选项中错误的语句是

A.flag=False

B.flag=Not flag

C.flag=True

D.Exit Do

答案

参考答案:C

解析: 本题考查的是VBA编程基础、循环结构。Do…While…Loop循环结构是在条件式为真时,执行循环体,并持续到条件式结果为假或执行到Exit Do语句而退出循环。 在题目要求的事件代码中“If result>=0 And result<=100 Then”就是判断输入的成绩是否在0到100分之间,而语句“Else MsgBox”成绩输入错误,请重新输入””则是对输入的成绩不在0到100分之间的情况进行处理,所以可以判断出,要求填空的部分应该是针对输入成绩正确的情况进行处理,即代码判断条件满足,退出循环。 本题中选项A、B、D均可以使程序退出循环,而选项c则会使循环继续下去,成为死循环。

完形填空
One day, a woman sat down next to a man on a bench near a playground. The woman _36__ a little boy in a red coat and said: “That is my son __37__ is moving smoothly down the slide (滑板)”. “What a lovely boy!” the man replied. Then he went __38__ saying, “That is my daughter on the bike. She is __39__ a white dress”.
After a while, the man looked at his __40__ and called to the girl in white, “Shall we go home, Mary?” “Only five __41__ minutes, Dad, please?” little Mary cried. The man __42__ and Mary went on riding her bike happily. Five minutes passed soon. The father __43__ and called again to his daughter: “It’s time __44__ now, Mary?” Again, Mary pleaded (恳求), “Give me more minutes, Dad. __45__ five more minutes, OK?” The man smiled and said: “OK.”
The __46__ responded, “You are surely a patient father.” __47__ in thought, the man said nothing. However, after a __48__, he smiled and then said: “Her elder brother Tom was killed by a __49__ driver last year while he was riding his bike near here. I never __50__ much time with Tom and now I would give anything for just five more minutes with him. I wouldn’t make the same __51__ with Mary. She thinks she has five more minutes to ride her bike. The __52__ is that I get five more minutes to watch her play. Life sometimes __53__ too suddenly. ”
Yes, life is all about making priorities (优先考虑的事), and what are your priorities? Don’t always __ 54__ excuses for your not being able to accompany your family members or your friends. Give someone you are __55__ five more minutes of your time today!
小题1:
A.pointed toB.looked upC.shouted atD.argued with
小题2:
A.whichB.whoC./D.whose
小题3:
A.inB.upC.on D.out
小题4:
A.wearingB.puttingC.foldingD.glaring
小题5:
A.feetB.watchC.honeyD.gift
小题6:
A.lessB.illegalC.latterD.more
小题7:
A.noddedB.shookC.refusedD.shocked
小题8:
A.put downB.stood upC.cut downD.picked up
小题9:
A.goingB.goneC.wentD.to go
小题10:
A.TooB.ImmediatelyC.ClearlyD.Just
小题11:
A.womanB.manC.girlD.boy
小题12:
A.ReactedB.FrightenedC.LostD.Rebuilt
小题13:
A.rankB.whileC.realityD.shelter
小题14:
A.socialB.drunkC.suitableD.unfair
小题15:
A.spent B.wastedC.explodedD.fed
小题16:
A.rideB.groundC.mistakeD.preparations
小题17:
A.chanceB.truth C.injuryD.glory
小题18:
A.harvestsB.ignoresC.changesD.orders
小题19:
A.operateB.questionC.makeD.purchase
小题20:
A.proud ofB.beneficial toC.worried aboutD.devoted to
单项选择题