




已阅读5页,还剩8页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
笔试模拟题(一) 答案第一部分 计算机基础知识1. 2. 3. 4. 5. 6. 7. 8. 9. 10. ADCABBDCAC11. 12. 13. 14. 15. 16. 17. 18. 19. 20. BCDCDDCDCB第二部分 Visual Basic程序设计一、选择题1. 2. 3. 4. 5. 6. 7. 8. 9. 10. DABCDDABBA二、填空题(1) (X+Y5 And Y5)(2) 31(3) 63(4) 0(5) 4(6) 2 3 4 5 6 (7) 6 7 8(8) 10(9) 1 1 2(10) 1 1 1(11) 3 1 4(12) 1 3 1(13) 6.5(14) 4 9 13(15) 19.5(16) Val(Text1.Text)(17) xn 或 t*x(18) s*n(19) t/s = 10 -5(20) x-1 或 Sqr(x)(21) Flag = False(22) List1.AddItem x(23) 10(24) i + 1(25) temp(26) Text2.Text & sort(i)(27) and total(p2) Mod 6 = 0(28) ( & p1 & , & p2 & )(29) m + Val(Mid(Cstr(n), i,1)(30) total = m第三部分上机改错与编程一、改错题Option ExplicitPrivate Sub Form_Click() Dim a(10) As Integer, i As Integer For i = 1 To 10 a(i) = i Next i For i = 1 To 10 改为 For i = 1 To 9 If p(a(i) + a(i + 1) = False Then Print a(i), a(i + 1) 改为p(a(i) + a(i + 1) = True Next iEnd SubPrivate Function p(x As Integer) As Boolean Dim i As Integer p = False For i = 2 To Int(Sqr(x) If x Mod i = 0 Then Exit For 改为 Exit Function Next i p = TrueEnd Function二、编程题Option Base 1Dim A(5, 5) As IntegerPrivate Sub Command1_Click() Dim i As Integer, j As Integer For i = 1 To 5 For j = 1 To 5 A(i, j) = Int(9 - 1 + 1) * Rnd + 1) Picture1.Print A(i, j); Next j Picture1.Print Next iEnd SubPrivate Sub Command2_Click() Dim Sum1 As Integer, Sum2 As Integer Dim i As Integer, j As Integer For i = 1 To 5 For j = 1 To 5 If i j Then Sum2 = Sum2 + A(i, j) End If End If Next j Next i Text1 = CStr(Sum1) & - & CStr(Sum2) & = & CStr(Sum1 - Sum2)End Sub模拟练习二答案第一部分 基础知识一、 选择题DBBBD BBABC AABAA DABDC第二部分 VB程序设计一、 选择题CCCCB AACDB二、填空题1、$*$*2、0.6 1.8 5.43、11 2 434、1 5 2 8 35、2 2 1096、sum=1 a*(x2/(2*n*(2*n-1) Abs(a) =0.0000001 sum7、Len(a) zh(b) 1 n8、UBound(P) P(I)+P(J)+P(k) I Mod J =0 I9、Len(st) Mid(st,i,1) A(idx)+1 Asc(“a”) 25第三部分上机改错与编程 一、 改错题Option ExplicitPrivate Sub Form_Click() Dim n As Integer Dim flg As Boolean Dim flg As Integer n = InputBox(input n:) Call Conver(n, flg) If flg = True Then Print n; 是降序数 Else Print n; 不是降序数 End If End SubPrivate Sub Conver(n As Integer, flg As Boolean) byval flg as Boolean Dim x As String, i As Integer x = Trim(Str(n) For i = 1 To Len(x) - 1 If Mid(x, i, 1) Next i If i = Len(x) Then flg = True Else flg = False End Sub二、编程题Private Sub Command1_Click() 生成列表 Dim i As Integer Dim j As Integer Dim k As Integer For i = 10 To 10000 If Prime(i) Then For j = 2 To Sqr(i) For k = 2 To Sqr(i) If i = j 2 + k 2 And j n Then Prime = True End IfEnd FunctionPrivate Sub Command2_Click() 清除列表 List1.ClearEnd SubPrivate Sub Command3_Click() 返回 EndEnd Sub模拟练习三答案第一部分 基础知识一、选择题1D 2.C 3.D 4.C 5.C 6. C 7.A 8. A 9. A 10.C11.A 12.B 13.A 14.C 15.B 16.C 17.A 18.C 19.B 20.A第二部分 VB基础知识一、选择题21B 22.B 23.B 24.B 25.D 26.A 27.A 28.C 29.B 30.D二、填空题(1)Option Base1(2) LBound (3)Ubound(4)过程 (5)模块(6)3(7)7(8)23(9)10 4 6(10)34 12 22(11)44(12)10 6(13)5 4(14)10 -6(15)x2000(16) xeps(20) (-1)n(21) t*x2/n(22) Exit For(23) p2=True(24) i(25) True(26) Str2=Str2&Convert(A(I)(27) d=Mid(St,I,1)(28) S=“”(29)S=B&S(30)Convert=S第三部分上机改错与编程一、 改错题1) For j=1 To Ubound(b) 改为For j=1 To Ubound(b)-12) Private Function wanshu(x As Interger,b()As Interger) As Boolean改为Private Function wanshu(ByAal x As Interger,b()As Interger) As Boolean3) For i=2 To x-1 sum=1改为sum=1For i=2 To x-1二、 编程题Option Explicit Dim n As Integer,Samp() As IntegerPrivate Sub Command1_Click() Dim i As Integer n=InputBox(输入样本个数n: ,10) ReDim samp(n) For i=1 To n samp(i)=Int(99*Rnd)+1 Text1=Text1&Str(samp(i) Next iEnd SubPrivate Sub Command2_Click() Dim Max As Integer, Min As Integer,i As Integer Dim news() As Single ReDim news(n) Call MaxMin(samp,Max,Min) For i=1 To n new(i)=(samp(i)-Min)/(Max-Min) List1.AddItem samp(i)& -&new(i) Next iEnd SubPrivate Sub MaxMin(a()As Integer,Max As Integer,Min As Integer)Dim i As Integer Max=a(1):Min=a(1) For i=2 To UBound(a) If a(i)Min Then Max=a(i) EndIfNext iEnd Sub Private Sub Command3_Click() Text1=:List.ClearEnd Sub模拟练习四答案第一部分1. C2. D3. B4. C5. B6. A7. C8. B9. B10. D11. B12. D13. C14. 15. B16. D17. A18. C19. D20. D第二部分一 选择题21. A22. A23. B24. D25. D26. C27. B28. A29. A30. C二 填空题1. C2. CW3. 84. 4 9 25. 3 5 76. 8 1 67. 38. 9.69. 1710. 17811. 17812. 613. 514. 1715. N/Fm16. P() as Integer17. ReDim Preserve P(Idx)18. I19. Int(41*Rnd) 2020. fan(a)21. b(j)+abs(a(i,j)22. FzFm23. Exit Function24. Fz&Fm25. Mid(S,i,1) =Mid(S,n,1)26. Vilidata=True27. c:data.txt For Input As #1128. Not EOF(11)29. ReDim Preserve B(UBound(B) + 1)30. B(i) = B(i - 1)第三部分上机改错与编程改错题Option ExplicitPrivate Sub Command1_Click() Dim a(9) As Integer, x As Integer, k As Integer, i As Integer Do While i = 9 x = Int(Rnd * 900 + 100) k = x Mod 10 If a(k) = 0 Then a(k) = xx=a(k) i = i + 1 Text1 = Text1 & Str(a(k) End If Loop sort asort(a) For i = 0 To 9 List1.AddItem a(i) Next iEnd SubPrivate Sub sort(a() As Integer) Dim temp As Integer, n As Integer, i As Integer, j As Integer n = UBound(a) For i = 0 To n For j = i + 1 To n If a(i) a(j) Then temp = a(i) a(i) = a(j)a(j)=a(i) a(j) = temp End If Next j Next iEnd Sub编程题Option ExplicitPrivate Sub Command1_Click() Dim i As Integer, s1 As Integer, s2 As Integer Dim k As Integer s1 = Text1: s2 = Text2 For i = s1 To s2 If luck(i) Then k = k + 1 List1.AddItem Str(i) End If Next i Text3 = kEnd SubPrivate Function luck(ByVal n As Integer) As Boolean Dim a(4) As Integer, k As Integer Do k = k + 1 a(k) = n Mod 10 n = n 10 Loop Until n = 0 If (a(1) + a(2) = (a(3) + a(4) Then luck = TrueEnd FunctionPrivate Sub Command2_Click() Text1 = : Text2 = : Text3 = List1.Clear Text1.SetFocusEnd Sub模拟练习五答案第一部分计算机基础知识1.D2.D3.B4.C5.C6.C7.B8.C9.A10.D11.B12.A13.B14.D15.C16.A17.A18.D19.B20.D第二部分VISUAL BASIC程序设计一选择题:21.d22.b23.c24.c25.c26.c27.a28.d29.b30.b二填空题:(1) .6 (2) 1.8 (3)5.4 (4)DHL (5)NRV (6)XBF (7)1 (8)-2 (9)6 (10)X=4 (11)26 (12)15 15 (13)6.5 (14)4 9 13 (15)19.5 (16)X ex exp = exp + 1 ex = ex * 2LoopIf M + 1 = ex Then Mersenne = TrueEnd IfEnd FunctionPrivate Function Prime(N As Integer) As BooleanDim k As IntegerFor k = 2 To Sqr(N) If N Mod k = 0 Then Exit FunctionNextPrime = TrueEnd Function二 编程题:Option ExplicitOption Base 1Dim a() As IntegerPrivate Function Prime(n As Integer) As BooleanDim k As In
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 抑郁症合并自主神经功能失调护理查房
- 阿克苏市2024-2025学年八年级下学期语文期末测试试卷
- 安徽省淮南市谢家集区2023-2024学年高二上学期期中考试物理试题含参考答案
- 安徽省蚌埠市龙子湖区2024-2025学年高三下学期高考二模物理题目及答案
- 2025 年小升初廊坊市初一新生分班考试数学试卷(带答案解析)-(冀教版)
- 工艺组2025年上半年工作总结和下半年工作计划-3-(4000字)
- 脑桥中央髓鞘溶解症患者护理
- 社区消防知识培训课件通知
- 统编版2025-2026学年三年级语文上册第五单元检测卷(有答案)
- 广东省广州市花都区华万学校2025-2026学年八年级上学期开学考试语文试题(含解析)
- 炒股保底协议书
- 蒸汽锅炉试题及答案
- 2025-2030中国透水砖市场深度调查研究报告
- 小儿荨麻疹的护理查房
- 电力拖动培训课件
- 2025年购房定金合同书模板电子版
- 《新能源材料概论》 课件 第2章 热电转换新能源材料
- 空雨伞管理法
- 甲状腺围手术期病人的护理
- T-CSPSTC 72-2021 隧道衬砌脱空注浆治理技术规程
- 碳中和技术概论 课件 第1-3章 碳中和概述、太阳能、风能
评论
0/150
提交评论