雨課堂學(xué)堂在線學(xué)堂云《Object Oriented Programming(Python)(日照職業(yè)技術(shù)學(xué)院)》單元測(cè)試考核答案_第1頁(yè)
雨課堂學(xué)堂在線學(xué)堂云《Object Oriented Programming(Python)(日照職業(yè)技術(shù)學(xué)院)》單元測(cè)試考核答案_第2頁(yè)
雨課堂學(xué)堂在線學(xué)堂云《Object Oriented Programming(Python)(日照職業(yè)技術(shù)學(xué)院)》單元測(cè)試考核答案_第3頁(yè)
雨課堂學(xué)堂在線學(xué)堂云《Object Oriented Programming(Python)(日照職業(yè)技術(shù)學(xué)院)》單元測(cè)試考核答案_第4頁(yè)
雨課堂學(xué)堂在線學(xué)堂云《Object Oriented Programming(Python)(日照職業(yè)技術(shù)學(xué)院)》單元測(cè)試考核答案_第5頁(yè)
已閱讀5頁(yè),還剩25頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

第1題Pythonhasarichcollectionofthird-partylibraries.第2題TheexceptionsinPython2areusedinthesamewayasthoseinPython3.第3題PyCharmisacompleteandfreeIDEtool.第4題WhichofthefollowingoptionsisnotafeatureofPython.ASimpleandeasytolearnBFreeopensourceCObjectorientedDCompiledlanguage第5題WhichofthefollowingstatementsaboutPython2andPython3isincorrect.APython3defaultstoUTF-8encodingBTheformatoftheprintstatementinPython2andPython3hasnotchangedCPython2defaultstoASCIIencodingDTheusageoftheoperator"http://"inPython2andPython3isconsistent第6題WhichofthefollowingstatementsaboutPythonnamingconventionsisincorrect.AModuleandpackagenamesshouldbeshortandalllowercaseBClassnamestypicallyuseuppercaselettersCConstantsareusuallynamedwithalluppercaselettersDCannotuseunderlineinfunctionname第7題Amongthefollowingoptions,()isavariablenamethatdoesnotcomplywiththespecifications.A_textB2cdCITCASTDHei_ma第8題Whichofthefollowingstatementsabouttheinput()andprint()functionsisincorrect.ATheinput()functioncanreceivedatainputfromthekeyboardBTheinput()functionreturnsastringtypedataCTheprint()functioncanoutputanytypeofdataDTheprint()functionoutputsdatathatdoesnotsupportlinebreaks第9題TherearetwowaysinwhichPythonprogramscanrun:____and____.正確答案::interactive正確答案::Filestyle第10題Pythonuniformlyuses____forindentation.正確答案::4spaces第11題InPython,____isusedtorepresentasinglelinecomment.正確答案::#第12題Using____and____inPythontorepresentmultiplelinesofcomments正確答案::Threesinglequotationmarks正確答案::Threedoublequotes第13題Pythonindentationcanmixtabsandspaces.第14題Pythoncanusemultilinecommentswiththreesinglequotesorthreedoublequotes.第15題Morecommentsarenotbetter.Forclearcode,thereisnoneedtoaddcomments.第16題Inordertoensuretheconsistencybetweentheprogramandtheproblem,aswellasthelong-termstableuseoftheprogram,peopledividetheprogramdevelopmentprocessintosixstages,namely:problemanalysis,boundarydivision,programdesign,programwriting,testingandcalling,upgradingandmaintenance.第17題Whetheritisasmall-scaleprogramthatsolvesthefourarithmeticoperationsoracomplexcontrolprogramusedbyspacecraft,theyallfollowtheoperationmodeofinputdata,processingdata,andoutputdata.第18題Variablenamesandclassnamesmustbemeaningfulandsinglelettersarestrictlyprohibited.第19題Variablenamescanusesystemkeywords.第20題Variablenamesshouldreflectthedatatypeandspecificmeaningofthevariableasmuchaspossible.第21題Python'snumbertypesincludeinteger,floating-point,complex,andBoolean.第22題Booleantypeisaspecialtypeofinteger.第23題ComplexnumbersinPythonconsistofrealandimaginaryparts.第24題ShapesinPythoncanberepresentedinbinary,octal,decimal,orhexadecimal.第25題Floatingpointtypecannotbecalculatedwithcomplexdata.第26題Usingslicingoperationstrings,thestepsizeofslicingcanonlybepositiveintegers.第27題Theoperator"=="inPythonisusedtodeterminewhethertwooperandsareequal.第28題Theoperator"="inPythonisusedtodeterminewhethertwooperandsareequal.第29題Theoperator"<>"inPythonisusedtodeterminewhethertwooperandsareequal.第30題Whichofthefollowingfunctionscanconvertanumericaltypetoastring.AComplex()BInt()CFloat()DStr()第31題WhichofthefollowingstatementsaboutPythonstringsisincorrect.AStringisadatatypeusedtorepresenttextBInPython,singlequotes,doublequotes,andtriplequotescanbeusedtodefinestringsCAsinglequotedstringcannotcontaindoublequotedcharactersDStringsdefinedusingtriplequotescancontainlinebreaks第32題Giventhevariablename="ZhangHao"andage=18,whichofthefollowingstringformattingoutputsisincorrectAPrint('Mynameis%s,Iam%dyearsoldthisyear'%(age,name))BPrint('Mynameis%s,Iam%dyearsoldthisyear'%(name,age))CPrint('Mynameis{},I'm{}yearsoldthisyear'format(name,age))DPrint(f'Mynameis{name},I'm{age}yearsoldthisyear')第33題Whichofthefollowingstatementsaboutstringoperationsiscorrect.AStringsupportsaddition,subtraction,multiplication,anddivisionoperationsBStringscanbeconcatenatedusingthe"+"symbolCStringscanbereplacedwithsubstringsusingthesplit()methodDStringscanusethestrip()methodtoremoveextraspacesonbothsides正確答案:BD第34題Givena=3andb=5,whichofthefollowingexpressionsyieldsanincorrectcalculationresult.AThevalueofa+=bis8BThevalueofa=bis-2CThevaluesofaandbare5DThevalueofa/bis0.6第35題Givena=2andb=8,whichofthefollowingexpressionsyieldsanincorrectcalculationresult.AThevalueofa%bis2BThevalueofa**bis256CThevalueofa/bis0DThevalueofa+=bis8第36題Givena=2andb=3,whichofthefollowingexpressionsyieldsanincorrectcalculationresult.Aa>TheresultofbisFalseBACA==bresultsinFalseDA=TheresultisTrue第37題Givena=10andb=20,whichofthefollowingexpressionshasanincorrectcalculationresult.AThevaluesofaandbare20BThevalueofaorbis20CThevalueofaorbis10DNotaresultisFalse第1題TheloopstatementsinPythonincludeforloopandwhileloop.第2題KeyifisusedinPythontorepresentconditionalstatements.第3題Onlystatementsthatmeettheconditionwillbeexecutedwhentheifconditionalexpressionistrue.第4題ThebreakandcontinuestatementsinPythoncanbeusedseparately.第5題If...elsestatementscanhandlemultiplebranchconditions.第6題Nestinginaforloopcanbeunderstoodascontainingaforloopstatementwithinaforloop.第7題ThewhileloopandforloopinPythonbothrepresentinfiniteloops.第8題ForloopsinPythondonotsupportnesting.第9題IfstatementsinPythondonotsupportnesteduse.第10題Pleasereadthefollowingprogram:a=1b=2c=3ifbA1,2,3B362C263D163第11題Pleasereadthefollowingprogram:x=0forxinrange(5):x+=1ifx=3:breakprint(x,end="")Theoutputresultoftheprogramis()A1B12C1,2,3D12345第12題Pleasereadthefollowingprogram:i=3j=5whileTrue:ifi<5:i+=iprint(i)breakelifj<1:j-=jprint(j)Runtheprogram,andtheoutputresultoftheprogramis()A8B2C6D0第13題Whichofthefollowingstatementsabouttheforloopisdescribedcorrectly.ATheforloopcantraverseiterableobjectsBForloopscannotbenestedforuseCTheforloopcannotbeusedwithanifstatementDTheforloopcannotcontrolthenumberoftimestheloopisexecuted第14題Whichofthefollowingstatementscanbreakoutoftheloopbody.AContinueBBreakCWhileDIf第15題Whichofthefollowingstatementscanendthisloopandcontinuetothenextloop.AContinueBBreakCWhileDIf第16題ThemodulesinPythonaredividedintobuilt-inmodules,custommodules,andthird-partymodules.第17題Modulescanbeimportedthroughthe"importmodule"and"frommoduleimportfunction/method".第18題ThepackageinPythonisadirectorycontaining__init__.py.第19題Whenusingthird-partymodules,itisnecessarytoinstalltheminadvance.第20題Apyfileisamodule.第21題The__init__.pyfileinthepackagestructurecannotbeempty.第22題Randomisabuilt-instandardlibraryinPythonthatcangeneraterandomdatausingfunctionswithinthelibrary.第23題TheOSmoduleprovidessystemleveloperations.第24題Therandom()functionintherandommodulecanonlygeneraterandomintegers.第25題Whenusingstandardmodules,itisnecessarytoinstalltheminadvance.第26題Moduleswithsimilarfunctionscanbeplacedinthesamepackage.第27題Standardmodulescanbeusedwithoutimport.第28題WhichofthefollowingstatementsaboutmodulesinPythoniscorrect.AOnlyPythonbuilt-instandardmodulescanbeusedintheprogramBOnlystandardmodulessupportimportCOnlyafterimportingthemodulecanthevariables,functions,andclassesinthemodulebeusedDCannotcustomizemodule第29題Whichofthefollowingmethodsaboutstandardmodulesisincorrect.AStandardmodulescanbeusedwithoutimportBTherandommodulebelongstothestandardmoduleCStandardmodulescanbeimportedthroughimportDThestandardmoduleisalsoa.pyfile第30題Whichofthefollowingimportmodulemethodsisincorrect.AImportrandomBFromrandomimportrandomCFromrandomimport*DFromrandom第31題Whichofthefollowingoptionscanrandomlygenerateaspecifiedrangeofintegers.ARamdom.random()BRandom.randint()CFromrandomimport*DRandom.uniform()第32題Whichofthefollowingstatementsaboutpackagesisincorrect.AThepackagecanbeimportedusingtheimportstatementBThepackagemustcontaina__int__.pyfileCModuleswithsimilarfunctionscanbeplacedinthesamepackageDThepackagecannotusefromImportMethodimport第33題Functionscanimprovecodereusability.第34題Globalvariablescanbeaccessedinallfunctions.第35題Thepositionalparametersofafunctionhavestrictpositionalrelationships.第36題Thedefaultparameterinafunctioncannotpassactualparameters.第37題Thefunctionwillbeexecutedimmediatelyafteritisdefined.第38題Variablescanbeaccessedbybackatanypositionintheprogram.第39題Globalvariablescanbedirectlyaccessedandmodifiedwithinanyfunction.第40題Afterthefunctionexecutioniscompleted,itsinternallocalvariableswillbereclaimed.第41題Whichofthefollowingstatementsaboutfunctionparametersisincorrect.AIfyoucannotdeterminethenumberofparametersthatneedtobepassedintothefunction,youcansetanindefinitelengthparameterforthefunctionBWhenusingkeywordparameterstopassarguments,itisnecessarytoassociateformalparameterswiththeargumentsCWhendefiningfunctions,defaultvaluescanbesetforparametersDTheindefinitelengthparameter*argscanpassanindefinitenumberofassociatedformalparameternamesasactualparameters第42題WhichofthefollowingstatementsaboutPythonfunctionsisincorrect.AArecursivefunctionisonethatcallsitsownfunctioninthefunctionbodyBAnonymousfunctionwithoutfunctionnameCAnonymousfunctionsarenodifferentfromfunctionsdefinedusingthekeyworddef第43題Readthefollowingprogram:numone=12defsum(numtwos):globalnumonenumone=90returnnumone+numtwoprint(sum(10))Runthecode,andtheoutputresultis()A102B100C22D12第44題Readthefollowingprogram:defmany_param(num'one,num_two,*args):print(args)many_param(11,22,33,44,55)Runthecode,andtheoutputresultis().A(11,22,33)B(22,33,44)C(33,44,55)D(22,33,44,55)第45題Pythonusesthe()keywordtodefineananonymousfunction.AFunctionBFuncCDefDLambda第46題Pythonusesthe()keywordtodefineafunction.AFunctionBFuncCDefDLambda第47題Pythonusesthe()keywordtodeclarelocalvariablesasglobalvariables.AFunctionBGlobalCNonlocalDLambda第48題Pythonusesthe()keywordtomodifyvariablesdeclaredinnestedscopeswithinalocalvariablescope.AFunctionBGlobalCNonlocalDLambda第49題Thefunctionimplementedbythefollowingcodeis():deffun(num):ifnum==1:return1else:returnnum*fun(num-1)AN!BTheHanoiTowerProblemCFibonaccisequenceDSumof1ton第50題Using()inPythoncanformescapecharacters.A/B\C$D%第51題Whichofthefollowingoptionsisusedtoformatastring.A%BFormat()C+D#正確答案:AB第52題Whichofthefollowingmethodscanconvertalllettersinastringtouppercase.AUpper()BLower()CTitle()DCapitalize()第53題Whichofthefollowingmethodscanconvertalllettersinastringtolowercase.AUpper()BLower()CTitle()DCapitalize()第54題Whichofthefollowingoptionsbelongstothestring.A1BPythonC@123D1'.23正確答案:ABC第55題Stringscanbedefinedusingsinglequotes,doublequotes,andtriplequotes.第56題ThecollectionofdictionarykeyscanbeviewedthroughPython'sbuilt-inmethodkeys().第57題Callingtheitems()methodallowsyoutoviewalltheelementsinthedictionary.第58題ThecommoncharacteristicsofmutableandimmutablesetsinPythonaredisorderandnonrepeatableelements.第59題Createalistusingthebuilt-inlistfunction.第60題TheelementsofalistinPythoncanbeaccessedthrougheitherindexingorslicing.第61題Usethebuilt-intuplefunctiontocreateanancestor.第62題Thekeysinthedictionaryareunique.第63題Theelementsinthecollectionareunordered.第64題Theelementsinthedictionarycanbeaccessedthroughindexing.第65題Theelementsinthecollectioncanbeduplicated.第66題Alistcanonlystoredataofthesametype.第67題Tuplessupportoperationstoadd,delete,andmodifyelements.第68題Theindexoftheliststartsfrom1.第69題Ifthereisonlyoneelementinatuple,thentheremustbeacommaafterthatelement.第70題Whichofthefollowingmethodscanobtainallthekeysinthedictionary.AKeys()BValue()CList()DValues()第71題Whichofthefollowingmethodscanobtainallvaluesinthedictionary.AKeys()BValue()CList()DValues()第72題Callingthe()methodcanviewallelementsinthedictionary.AItems()BKeys()CValue()DList()第73題Usethe()functiontocreatealist.AList()BTuple()CDict()DSet()第74題Usethe()functiontocreateacollection.AList()BTuple()CDict()DSet()第75題Usethe()functiontocreateatuple.AList()BTuple()CDict()DSet()第76題TheelementsofalistinPythoncanbeaccessedthrougheither___or___methods.AindexBsectionCchoiceDIntercept正確答案:AB第77題Readthefollowingprogram:lan_info={1:"Python",2:"Java",3:"PHP"}lan_info.update({3:"C++"})print(lan_info)Runtheprogram,andtheoutputresultis().A{1:'Python',2:'Java',3:'PHP'}B{1:'Python',2:'Java',3:'C++'}C{3:'C++',1:'Python',2:'Java'}D{1:'Python',2:'Java'}第78題Whichofthefollowingmethodscannotdeleteelementsfromthedictionary.AClear()BRemove()CPop()DPopitem()第79題Readthefollowingprogram:set_1={'a','c','b','a'}print(len(set_1))set_1.add('d')print(len(set_1))Runtheprogram.Whichofthefollowingoutputresultsiscorrect.A45B34C23D25第80題Whichofthefollowingstatementscancorrectlycreateadictionary.ATest_one=()BTest_two={1:'A'}CTest_three=dict('a')DTest_four=dict{1:'A'}第81題Whichofthefollowingmethodscanarrangelistelements.ASort()BReverse()CMax()DList()ProjectThree第1題Thefirstparameterinthe__init__()methodisalways().ASefBSelfCCLSDempty第2題Aclasscanonlycreateoneinstantiatedobject.第3題Theconstructionmethodisautomaticallycalledwhencreatinganobject.第4題WhichofthefollowingoptionsisnotareservedwordforPythonlanguage.ADoBPassCExceptionDWhile第5題Pythondoesnotsupportmultipleinheritance.第6題Pythonautomaticallycallsthedestructorwhendeletinganobject.第7題Pythonprivatememberscanonlybeaccessedinternallyandcannotbeaccessedfromobjects.第8題Staticvariablesandstaticmethodsbelongtoinstancesoftheclass.第9題Staticmethodscanbeaccesseddirectlywithouttheneedforcallingwithaclassnameorstaticmethodname.第10題Staticmethodscandirectlymanipulateclassstaticvariables.第11題Classmethodscanmanipulateclassstaticvariables.第12題Staticmethodsdonotrequirethekeywordself.第13題Bothstaticmethodsandclassmethodscanbecalledbyobjects.第14題Readthefollowingprogram:li_one=['p','c','q','h']li_two=['c']li_one.extend(li_two)li_one.insert(2,'n')print(li_one)Runtheprogram,andthecorrectoutputis().A['p','c','n','q','n','c']B['o','p','c','q','h','n']C['p','c','n','q','h','c']D['o','p','n','q','h','c']第15題Whichofthefollowingstatementsforcreatingtuplesiscorrect.ATu_one=tuple('1','2')BTu_two=(q)CTu_one=('on',)DTu_four=tuple(3,5)第16題ThecombineddatatypesinPythoninclude().ASequencetypeBCollectiontypeCmappingtypeDArraytype正確答案:ABC第17題Whichofthefollowingstatementsarecorrectforcombineddatatypes.ATheindexofasequencestartsfrom0BSequencesinPythonsupportbidirectionalindexingCMappingtypesstoredataintheformofkeyvaluepairsDTheelementsinthesetcanberepeated正確答案:ABC第18題InPython,thecorrectwaytocreatealistis().ACreatealistusingsquarebrackets[]BCreatealistusingcurlybraces{}CCreatealistusingthelist()functionDCreatealistusingparentheses()正確答案:AC第19題Alistisaniterableobjectthatcanbeaccessedonebyoneusingthefor...in...statement.第20題Whichofthefollowingmethodscanaddelementstothelist.AAppend()BExtend()CSort()DInsert()正確答案:ACD第21題Whichofthefollowingmethodscandeletelistelements.ADelstatementBRemove()CPop()DClear()正確答案:ABCD第22題ThecorrectstatementaboutsetsinPythonis().ATheelementsinthesetareunorderedBTheelementsinthesetareuniqueCTheelementsinthecollectioncanbedynamicallyaddedorremovedDOnceacollectioniscreated,itcannotbechanged正確答案:ABCProjectFour第1題Thefile'wb'modereferstowritingonlyintextmode.第2題Thefile'r+'modecanbereadandwritten,butthefilemustexist.第3題Thefile'w+'modecanbereadandwritten,andthefileshouldbecreatedfirstwhenitdoesnotexist.第4題Whatistheresultofrunningthefollowingcode?()importmathprintmath.floor(5.5)A5B5C5.5D6第5題Whatistheresultofrunningthefollowingcode?()foriinrange(2):print(i)A0B01C012D12第6題Whichofthefollowingareobject-orientedfeatures.AencapsulationBinheritCpolymorphicDcomposite正確答案:ABC第7題WhatisthecorrectstatementaboutPythonclasses.ATheinstancemethodofaclassmustcreateanobjectbeforeitcanbecalledBTheinstancemethodofaclassmustbecalledbeforecreatinganobjectCClassmethodscanbecalledusingobjectsandclassnamesDStaticmethodsofaclasscanbecalledusingtheclassnameandobject正確答案:ACD第8題WhichofthefollowingPythoncanstartnormally.ASpellingerrorsBIncorrectexpressionCIndenterrorDManuallythrowingexceptions第9題Thecorrectstatementaboutanomaliesis().AThrowinganexceptionintheprogramtoterminatetheprogramBThrowingexceptionsinaprogramdoesnotnecessarilyterminatetheprogramCSpellingerrorscancauseprogramterminationDIndentingerrorscancauseprogramtermination第10題WhichofthefollowingisnotavalididentifierinPython.AInt32B40XLCSelfD__Na__第11題Pythondoesnotsupportdatatypessuchas().ACharBIntCFloatDList第12題InPython,toaddalinebreaktoastring,whichcharactercombinationcanbeused.A\AB\NC\QD\X第13題InPython,theresultof3**2is().A3B6C9D12第14題InPython,addanelementmbetweenelementsaandbintheliststrs=['a','b','c'],andthecorrectoneis().AStrs.add(0,'m')BStrs.add(1,'m.)CStrs.insert(0,'m.)DStrs.insert(1,'m.)第15題InPython,thecorrectwaytouserange()toobtainnumbers1-5is().ARange(0,5)BRange(1,5)CRange(1,6)DRange(0,6)第16題InPython,use()toobtaintheminimumvalueinalist.AMinBMaxCCountDSum第17題Pythonreferstonumberswithdecimalpointsas().AdecimalBfractionCFixed-pointnumberDFloatingpointnumber第18題InPython,theoutermostlayerofthedictionaryuses().A()EncloseB[]EncloseitCEnclose{}DBringitup第19題InPython,thefunctionthatcausesaprogramtopauseandwaitfortheusertoinputsometextis().AInput()BOutput()CScanf()DPrint()第20題WhichkeywordinPythoncanimportamodule.AImportBSetCInputDFrom第21題InPython,theresultoftheoperationof(2+3)*4is().A16B17C19D20第22題ThecorrectusageofcommentsinPythonis().A#ThisisacommentB//ThisisacommentCThisisacommentD/*Thisisacomment*/第23題ThefileextensionforPythonprogramsis().A.txtB.libC.llD.py第24題InthePythonlanguage,theflagforacodesnippetis().AEnclosewith{}BAddasemicolonattheendCIndentedlinesofcodeDAdd"\n"tothestatement第25題InPython,listarr=[],usethelen(arr)methodtoobtainthelengthoflistarras().A-2B-1C0DNull第26題InPython,definingfunctionsrequirestheuseofthekeyword().ADefBDefineCIfdefDIfndef第27題Theresultof"ab"+"c"*2is().AAbc2BAbcabcCAbccDAbabcc第28題ThebestmethodtoimplementamultibranchselectionstructureinPythonis().AIfBIf--elseCIf--elif--elseDIf--elseIf--else第29題Themostmatchingfunctionofthetry--exceptstructureinPythonis().AHandlingexceptionsBAttempttoexecutePythonstatementsCAttempttowritedatatothedatabaseDAttemptingtoresolvecodeerrors第30題InPython,thepoweroperatoris().A*B**C/D%第31題ThemethodtoobtainthelengthofthestringsinPythonis().As.Len()Bs.LengthCLen(s)DLength(s)第32題Thepurposeofthestringfunctionstrip()is().ASplittingstringsintolistsbasedonspecifiedcharactersBConnecttwostringsequencesCRemovespacesonbothsidesofthestringorspecifycharactersDReplacespecificcharactersinastring第33題Beforereadingorwritingafile,whichofthefollowingmethodsisneededtocreateafileobject.ACreateBFolderCFileDOpen第34題InPython,commonloopsinclude().ADowhileBWhileCForDFor-loop正確答案:BC第35題Thereisastringstr01="ABCDEFG".Ifyouwanttoextractthecharacter"E",whichofthefollowingiscorrect.AStr01[4]BStr01[5]CStr01[-2]DStr01[-3]正確答案:AD第36題ThecorrectwaytoidentifymultilinecommentsinPythonis().AAnnotatecontentBCommentcontentC/*Annotationcontent*/D&Lt--AnnotationContent-->正確答案:AB第37題ThepossibleresultsoftheabovePythonstatementforimportrandomprint(random.randint(50100))are().A55B66C77D100正確答案:ABCD第38題ThecorrectkeywordforthepropertiesoftheListsetis().AOrderedBvariableCRepeatableDKeyvaluestoragestructure正確答案:ABC第39題Whenusingopentoreadtextfiles,whichfunctionsareusedtoreadfiles.AReadfile()BRead()CReadlines()DReadline()正確答案:BCD第40題Whenusingopentowritetextfiles,whichfunctionsareusedtowritefiles.AWritefile()BWrite(str)CWritelines()DWriteline()正確答案:BCProjectFive第1題InPython'sexceptionhandlingstructure,therearethreekeywords,namely().ATryBExcpetCCatchDFinally正確答案:ABD第2題Createaclassusingthe()keywordinPython.AClassBDefCTryDLamda第3題ThecorrectobjectstatementfordefiningtheCarclassis().ACar=CarBCar=Car()CNewCarDCar=newCar()第4題InPython,thecorrectstatementtocreatetheStudentclassinheritingthePersonclassis().AStudentextendPersonBClassStudent(Person):CClassStudentextendPersonDClassStudent第5題Subclasscannotoverridemethodsofparentclass.第6題Byinheritingtheparentclassfromthesubclass,allmethodsandpropertiesoftheparentclasscanbeused.第7題Subclasscannotinheritprivatepropertiesandmethodsfromparentclass.第8題Usethe()functiontocreatealist.AList()BTuple()CDict()DSet()第9題Usethe()functiontocreateacollection.AList()BTuple()CDict()DSet()第10題Usethe()functiontocreateatuple.AList()BTuple()CDict()DSet()第11題TheelementsofalistinPythoncanbeaccessedthrougheither___or___methods.Aindex

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論