![在线网课知道《Python语言程序设计(全英)(华南理工大学)》单元测试考核答案_第1页](http://file4.renrendoc.com/view3/M01/35/1C/wKhkFmZK0d6AJrqxAAC-86NqbF8638.jpg)
![在线网课知道《Python语言程序设计(全英)(华南理工大学)》单元测试考核答案_第2页](http://file4.renrendoc.com/view3/M01/35/1C/wKhkFmZK0d6AJrqxAAC-86NqbF86382.jpg)
![在线网课知道《Python语言程序设计(全英)(华南理工大学)》单元测试考核答案_第3页](http://file4.renrendoc.com/view3/M01/35/1C/wKhkFmZK0d6AJrqxAAC-86NqbF86383.jpg)
![在线网课知道《Python语言程序设计(全英)(华南理工大学)》单元测试考核答案_第4页](http://file4.renrendoc.com/view3/M01/35/1C/wKhkFmZK0d6AJrqxAAC-86NqbF86384.jpg)
![在线网课知道《Python语言程序设计(全英)(华南理工大学)》单元测试考核答案_第5页](http://file4.renrendoc.com/view3/M01/35/1C/wKhkFmZK0d6AJrqxAAC-86NqbF86385.jpg)
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
第一章单元测试1【单选题】(20分)WhichisNOTthemainpartofcomputer()A.CacheB.I/OequipmentC.memoryD.CPU2.【多选题】(20分)正确答案:CDWhichsymbolcanbeusedforcommentsinPython()A.//B.!C.“D.#3【单选题】(20分)TheintegrateddevelopmenttoolbuiltintoPythonis().A.VscodeB.IDLEC.JupyterD.Pycharm4【单选题】(20分)Whichisthecorrectoperatorforpower(Xy)?()A.NoneofthementionedB.X^yC.X**yD.X^^y5【单选题】(20分)Whichofthefollowingisincorrect?()A.float(3)B.float(4.2)C.float("3")D.float("3+5")第二章单元测试1【单选题】(20分)Whichofthefollowingisaninvalidvariable?()A.my_string_1B.fooC._D.1st_string2【单选题】(20分)WhatwillbetheoutputofthefollowingPythoncode?not(10<20)andnot(1030)()A.NooutputB.TrueC.FalseD.Error3【单选题】(20分)Whichonewillreturnerrorwhenaccessingthelist‘l’with10elements.()A.l[-1]B.l[10]C.l[-10]D.l[0]4【单选题】(20分)WhatwillbetheoutputofthefollowingPythoncode?lst=[3,4,6,1,2]lst[1:2]=[7,8]print(lst)()A.[3,[7,8],6,1,2]B.[3,7,8,6,1,2]C.SyntaxerrorD.[3,4,6,7,8]5【单选题】(20分)WhichofthefollowingoperationswillrightlymodifytheA.t=['h','e','l','l','o']t[0]='H'B.s='hello's[0]='H'C.t={'h','e','l','l','o'}t[0]='H'D.t=('h','e','l','l','o')t[0]='H'6【单选题】(20分)Thefollowingprograminputdata:95,theoutputresultis?()A.noneofthementionedB.Pleaseenteryourscore:95Yourabilityexceeds85%ofpeople!C.Pleaseenteryourscore:95Awesome!Yourabilityexceeds85%ofpeople!D.Pleaseenteryourscore:95Awesome!第三章单元测试1【单选题】(20分)Whichonedescriptionofconditioninthefollowingsiscorrect?()A.Thecondition24<=28<25islegal,andtheoutputisFalseB.Thecondition24<=28<25isillegalC.Thecondition24<=28<25islegal,andtheoutputisTrueD.Thecondition35<=45<75islegal,andtheoutputisFalse2【单选题】(20分)Theoutputofthefollowingprogramis?()A.PythonB.NoneC.pythonD.t3【单选题】(20分)forvarin___:()A.range(0,10)B."Hello"C.13.5D.[1,2,3]4【单选题】(20分)Afterthefollowingprogramisexecuted,theA.19B.9C.47D.465【单选题】(20分)Whichistheoutputofthefollowingcode?a=30b=1ifa=10:a=20elifa=20:a=30elifa=30:b=aelse:b=0print("a=",a,"b=",b)()A.a=20,b=20B.a=30,b=1C.a=20,b=1D.a=30,b=30第四章单元测试1【单选题】(20分)WhichkeywordisusedtodefineafunctioninPython?()A.defineB.defC.functionD.fun2【单选题】(20分)WhatwillbetheoutputofthefollowingPythoncode?()A.xis50Changedlocalxto2xisnow50B.xis50Changedlocalxto2xisnow100C.NoneofthementionedD.xis50Changedlocalxto2xisnow23.【多选题】(20分)正确答案:ABCDWhicharetheadvantagesoffunctionsinPython?()A.ReducingduplicationofcodeB.EasiertomanagethecodeC.ImprovingclarityofthecodeD.Decomposingcomplexproblemsintosimplerpieces4【单选题】(20分)Howdoesthevariablelengthargumentspecifiedinthefunctionheading?()A.twostarsfollowedbyavalididentifierB.oneunderscorefollowedbyavalididentifierC.onestarfollowedbyavalididentifierD.twounderscoresfollowedbyavalididentifier5【单选题】(20分)WhatwillbetheoutputofthefollowingPythoncode?list(map((lambdax:x**2),filter((lambdax:x%2==0),range(10))))()A.NooutputB.ErrorC.[0,1,2,3,4,5,6,7,8,9]D.[0,4,16,36,64]第五章单元测试1【单选题】(20分)Whichofthefollowingstatementscannotcreateademo.txtfile?()A.f=open("demo.txt","r")B.f=open("demo.txt","a")C.f=open("demo.txt","w")D.f=open("demo.txt","x")2【单选题】(20分)Afterexecutingthefollowingprocedure,whatcontentwillbesavedinthefile?file=open('test.txt','wt+')file.write('helloSCUT')file.close()file=open('test.txt','at+')file.write('helloworld')file.close()()A.helloSCUTworldB.helloSCUThelloworldC.helloSCUThelloworldD.helloworld3【单选题】(20分)WhichfunctionisnotthewayPythonreadsfiles.()A.readtext()B.readlines()C.readline()D.read()4【单选题】(20分)HowtorenameafileinPython?()A.os.rename(fp,new_name)B.os.set_name(existing_name,new_name)C.os.rename(existing_name,new_name)D.=‘new_name.txt’5【单选题】(20分)Whatistheusageoftell()functioninPython?()A.noneofthementionedB.tellsyoutheendpositionwithinthefileC.tellsyouthecurrentpositionwithinthefileD.tellsyouthefileisopenedornot第六章单元测试1【单选题】(20分)WhatwillbetheoutputofthefollowingPythoncode?()A.ReportserrorasoneargumentisrequiredwhilecreatingtheobjectB.Runsnormally,doesn’tdisplayanythingC.ReportserrorasdisplayfunctionrequiresadditionalargumentD.Displays0,whichistheautomaticdefaultA.‘New’B.NothingisprintedC.ErrorD.‘Old’3【单选题】(20分)WhatwillbetheoutputofthefollowingPythoncode?()A.testB.DemoC.__main__D.Exceptionisthrown4【单选题】(20分)WhichoneofthefollowingsisnotcorrectaboutClasshierarchy?()A.SubclasscaninheritallattributesfromsuperclassB.SubclasscanoverridethemethodsinheritedfromsuperclassC.Subclasscannotaddmorebehavior/methodsD.Subclasscanhavemethodswithsamenameassuperclass5【单选题】(20分)WhatwillbetheoutputofthefollowingPythoncode?()A.ErrorbecauseclassBinheritsAbutvariablexisn’tinheritedB.00C.01D.Error,thesyntaxoftheinvokingmethodiswrong第七章单元测试1【单选题】(20分)Numpyisathirdpartypackagefor____inPython?()A.FunctionB.ArrayC.TypecastingD.Lambdafunction2【单选题】(20分)HowtoconvertaNumpyarraytoalistinPython?()A.list(array)B.array.listC.list.append(array)D.list.array3【单选题】(20分)WhichkeywordisusedtoaccesstheNumpypackageinPython?()A.loadB.fetchC.fromD.import4【单选题】(20分)Whichoneiscorrectsyntaxforthe‘reshape()’functioninNumpy?()A.reshape(array,shape)B.array.reshape(shape)C.reshape(shape,array)D.reshape(shape)5【单选题】(20分)Whatwillbetheoutputforthefollowingcode?importnumpyasnpa=np.array([1,2,3],dtype=complex)print(a)()A.[[1.+0.j,2.+0.j,3.+0.j]]B.[1.
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 知识产权在教育创新中的推动作用
- 双碳目标下的绿色能源项目投资合同
- 个人房屋带车库买卖协议书
- 数据安全保障服务协议书
- 河北经贸大学消防维保合同
- 社交与沟通技能在商业领域的价值
- 小学生地理知识的奥秘征文
- 橱柜三方施工合同复习进程
- 科学饮食健康瘦身新纪元
- 仓储外包服务合同
- 健康管理与个人健康2024年的健康护理方法
- 安徽省合肥市庐阳区评价2023-2024学年六年级下学期5月模拟预测数学试题+
- 钉钉办公软件培训课件
- JBT 1472-2023 泵用机械密封 (正式版)
- 价格法价格违法行为和明码标价法律法规价格欺诈知识
- 2016-2023年山东力明科技职业学院高职单招(英语/数学/语文)笔试历年参考题库含答案解析
- 2022版《义务教育教学新课程标准》解读课件
- 江苏省2023年普通高校专转本选拔考试计算机专业大类专业技能试卷及答案解析
- 2024年度(完整版)《各种各样的天气》课件
- 设备采购 投标方案(技术方案)
- 越野车改装方案
评论
0/150
提交评论