|
2021年秋季《VisualBasic程序设计》形考任务2
1.[单选题] 从一个字符串中的第3个字符开始,获取5个字符,应使用()
A.Len函数
B.Mid函数
C.Left函数 D.Right函数
答:——B——
2.[单选题] 如果要在程序中显示一个弹出式菜单,那么要调用Visual Basic中提供的方法是().
A.Print
B.Move
C.Refresh D.PopupMenu
答:——D——
3.[单选题] 对于窗体级变量,下列说法中错误的是().
A.所在窗体的各子程序都可以访问 B.其他窗体的子程序不能访问
C.所在窗体发子程序不能访问用Private定义的窗体级变量
D.一定要在所在窗体的通用区内定义
答:——C——4.[单选题] "X是小于80的非负数",用VB表达式表示正确的是().
A.
B.0≤X<80
C.0<=X<80
D.0<=x and x<80
E.0<=x Orx<80 答:————
5.[单选题] 下列可以用来存储图像供其他对象使用的控件是().
A.ToolBar
B.StatursBar
C.ImageList D.TreeView
答:————
6.[单选题] 以下可以作为Visual Basic 变量名的是().
A.SIN B.CO1
C.COS(X)
D.X(-1)
答:————7.[单选题] 用下面的语句所定义的数组的元素的个数是().DimA(-3 To 5)As Integer
A.6
B.7
C.8
D.9
答:————
8.[单选题] 表达式6+10 Mod 4*2+1的值是(). A.9
B.11
C.1
D.3 答:————
9.[单选题] 有如下程序段:
Dim strl As String*5Strl=”Visual Basic”
当该段程序被执行完时,变量strl的值为().
A.”Visual”
B.”Visua” C.”V”
D.”Visual Basic”
答:————
10.[单选题] 当单击工具拦上的按扭时,会触发的事件是(). A.ButtonClick
B.Change
C.Load
D.KeyPress
答:————11.[单选题] 在设计菜单时,如果要在菜单中加入一个菜单分隔条,则菜单分隔条的标题必须设置为()
A.加号(+) B.减号(-)
C.星号(*)
D.感叹号(!) 答:————
12.[单选题] Sub过程与Function过程最根本的区别是(). A.Sub过程可以使用Call语句或直接使用过程名调用,而Function过程不可以.
B.Function过程可以有参数,Sub过程不可以.
C.两种过程参数的传递方式不同.
D.Sub过程的过程名不能返回值,而Function过程能够通过过程名返回值.
答:————13.[单选题] 可获得字符的ASCII码的函数是()。
A.Val B.Fix
C.Asc
D.Chr
答:————
14.[单选题] 把数值型转换为字符串型需要使用的函数是()。 A.Val
B.Str
C.Asc D.Chr
答:————
15.[单选题] 按照变量的作用域可将变量划分为( )。
A.公有、私有、系统
B.全局变量、模块级变量、过程变量
C.动态、常数、静态
D.Public、Private、Protected
答:————16.[填空题] 菜单一般有 <input type="text" maxlength="13" id="425f76c1-158e-4ba6-a816-0e766cc5a5b6" responseid='RESPONSE_1' name="425f76c1-158e-4ba6-a816-0e766cc5a5b6" />和 <input type="text" maxlength="13" id="425f76c1-158e-4ba6-a816-0e766cc5a5b6" responseid='RESPONSE_2' name="425f76c1-158e-4ba6-a816-0e766cc5a5b6" />两种基本类型。
答:————17.[填空题] 使用Hide方法会隐藏被调用的窗体,但是在调用Hide方法之后不会把窗体 <input type="text" maxlength="12" id="916b9c71-72aa-4efc-8bee-a435e47f89e2" responseid='RESPONSE_1' name="916b9c71-72aa-4efc-8bee-a435e47f89e2" />,被调用的窗体中的属性等已处于 <input type="text" maxlength="13" id="916b9c71-72aa-4efc-8bee-a435e47f89e2" responseid='RESPONSE_2' name="916b9c71-72aa-4efc-8bee-a435e47f89e2" />。
答:————
18.[填空题] 设A=2,B=3,C=4,D=5。表达式Not A<=C Or4*B^2 And B< >A+C的值为 <input type="text" maxlength="15" id="eae45514-a1ce-416b-8dca-e58916cc9f47" responseid='RESPONSE' name="eae45514-a1ce-416b-8dca-e58916cc9f47" />。
答:————
19.[填空题] 组合框具有 <input type="text" maxlength="13" id="0677aca1-3ec6-4021-a722-e64a152e15f4" responseid='RESPONSE_1' name="0677aca1-3ec6-4021-a722-e64a152e15f4" />和 <input type="text" maxlength="13" id="0677aca1-3ec6-4021-a722-e64a152e15f4" responseid='RESPONSE_2' name="0677aca1-3ec6-4021-a722-e64a152e15f4" />两种控件的基本功能。
答:————
20.[填空题] 在VisualBasic语言中有三种形式的循环结构。其中,若循环的次数可以事先确定,可使用 <input type="text" maxlength="18" id="6b859689-b27a-445a-a489-55164b82e425" responseid='RESPONSE_1' name="6b859689-b27a-445a-a489-55164b82e425" />循环;若要求先判断循环进行的条件,可使用 <input type="text" maxlength="28" id="6b859689-b27a-445a-a489-55164b82e425" responseid='RESPONSE_2' name="6b859689-b27a-445a-a489-55164b82e425" />循环或 <input type="text" maxlength="20" id="6b859689-b27a-445a-a489-55164b82e425" responseid='RESPONSE_3' name="6b859689-b27a-445a-a489-55164b82e425" />循环。 答:————
21.[问答题] Private Sub Form_Click( )
Static Sum As Integer For I= 1 to 100
Sum=Sum+I Next I
Print Sum
End Sub程序运行结果为:
答:————
22.[问答题] Private Sub Command1_Click( )
Dim a,b As Integer
A=3.4
B=3.4Text1.Text=a
Text2.Text=b
End Sub
程序运行结果为:
答:————23.[问答题] Private Sub Form_click( )
For i% =1 to3
Forj% = 1 to i Print L Trim(Str(i%))+ “*”+L Trim(Str(j%))+ “=”;i% * j%;
Next j%
Print
Next i%End Sub
程序运行结果为:
答:————
24.[问答题] <span style="font-size: 10.5pt; font-family: 宋体; background: white; color: black; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">购物优惠程序。某商场为了加速促成商品流通,采用购物打折的优惠办法,每位顾客一次购物(</span><span lang="EN-US" style="font-size: 10.5pt; font-family: "Times New Roman","serif"; background: white; color: black; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">1</span><span style="font-size: 10.5pt; font-family: 宋体; background: white; color: black; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">)在</span><span lang="EN-US" style="font-size: 10.5pt; font-family: "Times New Roman","serif"; background: white; color: black; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">100</span><span style="font-size: 10.5pt; font-family: 宋体; background: white; color: black; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">元以上者,按九五折优惠;(</span><span lang="EN-US" style="font-size: 10.5pt; font-family: "Times New Roman","serif"; background: white; color: black; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">2</span><span style="font-size: 10.5pt; font-family: 宋体; background: white; color: black; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">)在</span><span lang="EN-US" style="font-size: 10.5pt; font-family: "Times New Roman","serif"; background: white; color: black; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">200</span><span style="font-size: 10.5pt; font-family: 宋体; background: white; color: black; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">元以上者,按九折优惠;(</span><span lang="EN-US" style="font-size: 10.5pt; font-family: "Times New Roman","serif"; background: white; color: black; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">3</span><span style="font-size: 10.5pt; font-family: 宋体; background: white; color: black; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">)</span><span lang="EN-US" style="font-size: 10.5pt; font-family: "Times New Roman","serif"; background: white; color: black; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">300</span><span style="font-size: 10.5pt; font-family: 宋体; background: white; color: black; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">元以上者,按八折优惠;(</span><span lang="EN-US" style="font-size: 10.5pt; font-family: "Times New Roman","serif"; background: white; color: black; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">4</span><span style="font-size: 10.5pt; font-family: 宋体; background: white; color: black; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">)</span><span lang="EN-US" style="font-size: 10.5pt; font-family: "Times New Roman","serif"; background: white; color: black; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">500</span><span style="font-size: 10.5pt; font-family: 宋体; background: white; color: black; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">元以上者按七折优惠。在窗体上添加两个文本框和一个命令按钮,要求在</span><span lang="EN-US" style="font-size: 10.5pt; font-family: "Times New Roman","serif"; background: white; color: black; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">Text1</span><span style="font-size: 10.5pt; font-family: 宋体; background: white; color: black; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">中输入购物商品总金额,单击命令按钮,在</span><span lang="EN-US" style="font-size: 10.5pt; font-family: "Times New Roman","serif"; background: white; color: black; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">Text2</span><span style="font-size: 10.5pt; font-family: 宋体; background: white; color: black; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">中输入优惠后的价格。程序运行结果如图解所示。<br /><img width="400" height="339" alt="" src="/Attachment/Itembank/QuestionAttachments/201711/e3e0375d-a265-4cc8-8402-9f75bffeb3f9/20171122152255443.jpg" /><br /></span>
答:————
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
上一篇:甘肃电大开放大学22《visualbasic程序设计》形考任务1满分形考作业非答案下一篇:甘肃电大开放大学22《visualbasic程序设计》形考任务3题目形考作业非答案
|