版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
第1題ThefollowingisnotafeatureofPython:()AEasytolearnBOpen-sourceandfreeCLow-levelprogramminglanguageDHighportability第2題Inthefollowingoptions,()isnotaconstant.A'python'B8.25CpythonDTrue第3題ThestatementthatisincorrectaboutPythonmemorymanagementis:AVariablesdonotneedtobedeclaredinadvance.BVariablescanbeuseddirectlywithoutcreatingandassigningthemfirst.CVariablesdonotneedtospecifyatype.DResourcescanbereleasedusingdel.第4題Inthefollowingoptions,thebooleanvalueof()isnotFalse.ANoneB0C()D1第5題Incomputers,informationprocessingandstoragearedoneusing()ABinarycodeBDecimalcodeCHexadecimalcodeDASCIIcode第6題ThewayPythonsourcecodeisexecutedis()ACompiledexecutionBParsingexecutionCDirectexecutionDCompile-as-you-goexecution第7題Whichofthefollowingstatementsisincorrect?AAllstandardobjectsexceptdictionarytypescanbeusedforBooleantesting.BThebooleanvalueofanemptystringisFalse.CThebooleanvalueofanemptylistobjectisFalse.DThebooleanvalueofanynumberobjectwithavalueof0isFalse.第8題Thefollowingidentifiersarevalid:AhelloWorldB2ndObjChello#worldD_helloworld第9題Thefollowingsymbolrepresentsasingle-linecommentinPython:().A#B//CD"“"第10題Ifa=9andb=2,whichofthefollowingoperationsisincorrect?AThevalueofa+bis11B
Thevalueofa//bis4CThevalueofa%bis1DThevalueofa**bis18第11題ThefollowingdatatypesarenotsupportedinPython:AintBcharCfloatDdicitionary第12題WhichofthefollowingstatementsaboutcomplexnumberssinPythonisincorrect?AThesyntaxforrepresentingacomplexnumberisreal+imagejBBoththerealandimaginarypartsarefloating-pointnumbersCTheimaginarypartmustbesuffixedwithjandmustbelowercaseDThemethodconjugatereturnsthecomplexconjugateofacomplexnumber第13題Whichofthefollowingstatementsaboutstringsisincorrect?ACharactersshouldbeconsideredasstringsoflength1BStringsareterminatedbythe'\0'characterCStringscanbecreatedusingeithersinglequotesordoublequotesDSpecialcharacterssuchasnewlineandcarriagereturncanbeincludedintriple-quotedstrings第14題InPythonexpressions,()canbeusedtocontroltheorderofoperations.。A()B[]C{}D
第15題Pythonlanguagebelongsto()AMachinelanguageBAssemblylanguageChigh-levellanguage.DScientificcomputinglanguage第16題()Thebuilt-infunctionopen()cancorrectlyopenafileaslongasthefilepathiscorrect.第17題()Pythonusesautomaticmemorymanagementbasedonvalues.第18題()Samevaluesarenotalwayskeptinmemoryatthesametime.第19題()Pythondoesnotallowkeywordstobeusedasvariablenames.第20題()IfcannotbeusedasavariablenameinPython.第21題()ChinesecharacterscanbeusedasvariablenamesinPython3.x.第22題()Pythonvariablenamesmuststartwithaletterorunderscoreanddistinguishbetweenuppercaseandlowercaseletters.第23題()Theadditionoperatorcanbeusedtoconcatenatestringsandgeneratenewstrings.第24題()0o12fisnotavalidoctalnumber.第25題()OxadisavalidhexadecimalnumberrepresentationinPython.第26題()314jisavalidPythonnumerictype.第27題()TherearemultiplewaystocommentcodeinPython,notjustusingthecaretsymbol.第28題()Listscannotbeusedaskeysindictionaries.第29題()Tuplescanbeusedaskeysindictionaries.第30題()Theadditionoperator+inPython3.xcanperformnumericaladdition,stringconcatenation,listandtupleconcatenation,andsetunionoperations,butitcannotmergelistsandtuplesorperformsetunionoperations.第1題Thedescriptionerrorabouttheroleofthefunctionis().AStructuringprogrammingisthemostbasicencapsulationofcode,generallyorganizingaparagraphofcodeaccordingtofunction.BThepurposeoftheencapsulationistoreuseandreducethecode.CThecodeismorebeautifulandeasytoread.DNoneoftheaboveiscorrect第2題Pythonscriptfileisextendedasthe().ApythonBpyCptDpg第3題Inthetransferoffunctionparameters,thedescriptionofthe().Apythonimplementsthesafetyvaluetransferparameter,whichreferstothevalueoftheconstantvariable(realreference)whencallingthefunction.BRealparticipationparametersarestoredintheirrespectivememoryspaceandaretwounrelatedindependentvariables.CChangethevalueoftheshapeparameterwithintheparameter,andthevalueoftherealparametergenerallydoesnotchange.DThenameoftherealparticipationparametersmustbethesame.第4題The()functionisafunctionthatdirectlyorindirectlycallsthefunctionitselfArecurrenceBclosureClambdaDanonymous第5題Usethe()functiontoreceivetheinputdatausedAaccept()Binput()Creadline()Dlogin()第6題Regardingthedescriptionoftherecursivefunction,thecorrectoneinthefollowingoptionsisthe()AThefunctionnameservesasthereturnvalueBcontainsacircularstructureCFunctionsaremorecomplexDThefunctioncontainsasecondcalltothefunction第7題InPython,regardingthedescriptionofthefunction,thecorrectoneinthefollowingoptionsisthe()AThefunctioneval()canbeusedfornumericalexpressionevaluation,suchaseval("2*3+1")BPythonNotypeisspecifiedinthefunctiondefinition,whichmeansthattheparametercanberegardedasarbitraryinthefunction!makeuseofCOnlyonereturnstatementisallowedinafunctionDPython,defandreturnarethereservedwordsthatafunctionmustuse第8題Assumingthatglobalreservedwordsarenotincludedinthefunction,forthemethodtochangetheparametervalue,thefollowingoptionerroris()AChangethevalueoftheoriginalparameterwhentheparameteristhelisttypeBWhentheparameterisacombinationtype(variableobject),changethevalueoftheoriginalparameterCWhetherthevalueoftheparameterchangesisrelatedtotheoperationofthevariableinthefunction,regardlessoftheparametertypeDWhentheparameterisanintegertype,thevalueoftheoriginalparameterisnotchanged第9題Pythonbuilt-infunction,canreturnthelengthofobjects(characters,lists,tuples,etc.)orthenumberofitems()AdescribeBintClongDlen第10題The()isnotincludedinthefunctiondefinitionformatAkeywordsdefBfunctionnameCactualparameterDfunctionbody第11題Thefollowingstatementthatisincorrectisthatthe()AWhendefiningAfunction,theparameterofafunctiondoesnotrepresentanyspecificvalue,andonlywhenafunctioncalls,aspecificvalueisassignedtotheparameter.BTherandommodulemayget100byusingthefunctionrandint(1,100)CFunctionisawayofcodemultiplexingDThefunctionmustcontainaretur第12題Thefollowingincorrectstatementofthepythonfunctionisthe()TheApythonfunctiondoesnotrequirethefunctionnameTheBpythonfunctiondoesnotrequiredtospecifyaparameterdatatypeThereturnvalueoftheCpythonfunctioncanbemultipleThekeyworddefinedbytheDpythonfunctionisthedef第13題Inthefollowingoptions,thefunctiondefinitionerroristhe()Adefvfunc(*a,b)Bdefvfunc(a,b)Cdefvfunc(a,*b)Ddefvfunc(a,b=2)第14題PythonUnsupportedparametertype()AlocationparameterBDefaultparametersCvariableDTheinvariantparameter第15題ThebasicPythonbuilt-infunctioneval()is()A.Afloating-pointnumberB.RemovethestringBPythonexpressionevaluationC.CalculatethestringChexcharacterstringDtoEfromthemostlateralquotationmarksandreturnitsvalueasFasthevalueforthePythonstatementD.ConvertanintegerGto正確答案:G第16題()ThereturnvaluetypeofaPythonfunctiondoesnotneedtobespecifiedwhendefiningthefunction.第17題()Thereturnstatementinafunctionmaynotalwaysbeexecuted.第18題()ItisnotnecessarytodeclarethetypeoffunctionparameterswhendefiningafunctioninPython.第19題()Thenumberofactualargumentspassedwhencallingafunctiondoesnotnecessarilyhavetomatchthenumberoffunctionparameters.第20題()PositionalargumentsinPythonrefertopassingargumentstoafunctionwithoutanyadditionalexplanation,withmultipleactualargumentspassedsequentiallytocorrespondingformalparameters.Thenumberandorderofactualandformalparametersmustcorrespondexactly,otherwiseanexceptionwillbethrown.第21題()DefaultvalueparametersinPythonrefertosettingdefaultvaluesforsomeformalparameterswhendefiningafunction,andifactualargumentsarenotpassedfortheformalparametersthathavedefaultvalueswhencallingthefunction,thedefaultvaluesareused;ifactualargumentsarepassed,thoseargumentsareusedinstead.第22題()Onceafunctionisdefined,itcanbecalledanywhereintheprogram.第23題()Formalparametersareoptional,meaningafunctioncanincludeparametersornot,andmultipleformalparametersareseparatedbycommas.第24題()Functionsdonotnecessarilyimprovecodeexecutionspeed.第25題()Functionnamesfollowprogrammingconventions,startingwithalowercaseletterorunderscorefollowedbyanylengthofletters,numbers,underscores,etc.toformavalidfunctionname.第26題()Thefunctionbodyconsistsofaseriesofstatementsendingwithacolon,andtheremustbesomeindentationspacebetweenlineswithinthefunctionbodytoindicatethattheybelongtothefunctionbody.第27題()Keywordargumentscannotbepassedinanyorderandcannotbeomitted.第28題()Functionscanreturnvaluesofanytypetothecaller.第29題()Afunctioncallneedstoprovidetherequiredargumentsforthefunction,andthenumberofargumentsmustmatchthenumberdeclaredinthefunctiondefinition.第30題()Ifafunctiondoesnothaveareturnstatementorthereturnstatementdoesnothaveanyreturnvalue,thereturnvalueofthefunctionisNone.Practice3第1題Whichofthethreemajorobject-orientedfeaturesdoesnotincludethisfollowing?()ApackageBpolymorphicCconstructDinheritance第2題HowdoyoudefinetheprivatemethodinthePythonclass?()AAddprivatemodificationbeforemethodBAddtwounderlined__beforemethodCdeclarethefirstparametersettingofthemethodasselfDUseonlyprivatevariablesinthemethod第3題WhichofthefollowingstatementsistrueabouttheclassandinstancepropertiesofPython?()AClasspropertiescanbeaccessedbytheclassnameorinstancename.BClasspropertiescanbemodifiedbyeithertheclassnameorthepropertyname.CInstancepropertiescanbeaccessedthroughtheclassnameorinstancename.DInstancepropertiescanbemodifiedbytheclassnameorinstancename.第4題Whichofthefollowingcodedefinesthenameclasspropertycorrectly?()AclassMeeting:name="cqtbi"BclassMeeting:def__init__(self,name):=name;CclassMeeting:def__init__(self,id):name="cqtbi";DclassMeeting:="cqtbi"第5題PythonWhichkeywordisusedintheclassdeconstructionmethodinobject-orientedprogramming?()A__del__B__finish__C__delete__D__finalize__第6題Isthistherightwaytointroducethecustommodule?()Afrom
my_moduleimport
Studenttom=
my_module.Student('001',
'tom')
Bfrom
my_moduleimport
Studenttom=
Student('001',
'tom')
Cimport
my_moduletom=
Student('001',
'tom')Dimport
my_module.Studenttom=
Student('001',
'tom')第7題WhichofthefollowingstatementsiswrongabouttheparametersofthePythonfunction?()APositionparameterscannotbepassedmoreorless.BParameterswiththedefaultvaluesarethekeywordparameters.CTheindefinitelengthparametersshouldbeplacedattheendoftheparameterlist.DThedefaultparametersmustbeplacedbehindthepositionparameters.第8題Whichofthefollowinglambdaexpressionscorrectlydefinesanadditionfunction?Alambda
x,y:x+yBlambda(x,
y):
x+
yClambda
x,
y:
return
x+
yDlambda
x,
y=x+
y第9題Whichofthefollowingstandardmodulescanoperateonthefile?()AosBtimeCrandomDre第10題WhichofthefollowingregularexpressionsmatchestheIDcardnumber?()A\d[17]{\d|x|X}B\d{17}[\d|x|X]C\b[17]{\b|x|X}DCan't第11題IntheJavalanguage,0.6321isdataoftypefloat.()第12題re.searchThemethodscanstheentirestringandreturnsallsuccessfulmatches.()第13題Thederivedclassautomaticallycallstheconstructorofthebaseclass.()第14題PythonTopreferentiallyfindthecorrespondingmethodinthebaseclass,thebaseclassisnotfoundinthederivedclass.()第15題Theformalparameterofafunctionistheparameterdeclaredinparentheseswhendefiningafunction.()第16題Usingkeywordparameters,youcancallthemwithoutpassingthesequence.()第17題Whenyouusetheindefinitelengthparameter*argsintheparameterlist,theparametersareautomaticallyorganizedintoadictionaryincoming.()第18題ThePythonmoduleisessentiallyaPythonscriptfilethatcancontainvariables,functions,andclasses.()第19題Generatorsarespecialiteratorsthatexecutefromscratchoneverycall.()第20題TodefineafunctioninPython,youmustendwithreturnasthefunction.()Practice4第1題Whichofthefollowingcommandsistoinstallthird-partylibrariesinaPythondevelopmentenvironment?()AsetupByuminstallCpipinstallDimport第2題Whenusingawebcrawlertocrawldata,whatdoestheserverreturn503mean?()APagenotfoundBDeniedaccesstoCServerErrorDPageredirection第3題Inordertoallowthecrawlertoaccesstheserver,whichofthefollowingrequestheadsisusuallyrequired?()AAcceptBConnectionCUser-AgentDReferer第4題Ifyouneedtoopenafiletoreadandwrite,andifthefiledoesnotexist,whichreadandwritemodeisused?()ArBr+CwDw+第5題WhatistheXPATHsyntaxforgettingthenameofthedog(karl)oftypeHuskycorrectly,forthefollowingHTML?(B)<html>
<animal>
<dog
type="Husky">karl</dog>
<dog
type="Bulldog">momo</dog>
</animal>
</html>A//dog/@type="Husky"/textB//dog[@type="Husky"]/text()C//dog/@type="Husky"D/dog/@type="Husky"/text()第6題Whichofthefollowingerrorsdoestheserverreturn,usuallytriggeringthebackcrawlmechanism?()A301B403C503D200第7題Usingthecrawlertocrawltheserverdata,whichofthefollowingdocumentsshouldfollow?()Ahost.txtBrobots.txtCrule.txtDallow.txt第8題InPython,whichfunctionofpymyslisusedtoconnecttotheMySQLdatabase?()AopenBconnectCcreateDget第9題Whichofthefollowingthird-partymodulesiscommonlyusedforPythondataanalysis?()APandas
BScrapyCBeautifulSoupDlxml第10題WhenyouneedtowriteChinesetoafile,whichofthefollowingparametersisusuallyaddedwhenopeningthefile?()AenforceBencodingCdecodeDlocalization第11題Thesuccessofwebscrapingcanbedeterminedbycheckingthecodeattributeoftheresponseobject.()第12題InPython,theopenfunctionisusedtoopenfiles,andthefilemodesusuallyinclude"r","w","a","x",etc.()第13題Usingthe"r+"modetoopenafilemeansthatyoucanreadfromitaswellasappendcontent.(()第14題CSVfilestypicallyusethetabcharacter\ttoseparatedifferentfieldsinarow.()第15題Bydefault,Pythonopensfilesinbinaryformat.()第16題Whenafileisopenedusingthewithkeyword,youdonotneedtomanuallycalltheclosemethod.()第17題XMLdocumentswitherrorscannotbeparsedusinglxml.()第18題Whenthecontentofafileisverylarge,weshouldusetheread()methodtoreadit.()第19題Whenwritingtoafileusingthefile.write()function,youneedtomanuallyaddanewlinecharacterattheendoftheline.()第20題Usingbuilt-instandardlibrariesinPythondoesnotrequireimportingthem.()Practice5第1題InregularexpressionmatchinginPython,thedefaultmodeisgreedy.
()第2題Lambdaexpressionsareoftenusedtowritefunctionsthatneedtobecalledrepeatedly.
(
)第3題Thekeyof3Ddynamicfacerecognitiontechnologyliesinusinghigh-precision3Dfull-facecameratoobtainthethree-dimensionalgeometricfeaturesandblack-and-whitetexturefeaturesoftheface.(
)第4題Errorsencounteredwhenwritingprogramscanberoughlydividedintotwocategories:syntaxerrorsandruntimeerrors.()第5題InXPath,anXMLdocumentistreatedasanodetree,andtherootofthetreeiscalledtherootnode.
()第6題
PressF10onthebrowserpagetoopendevelopermode.
(
)第7題Therobotsprotocolisusedtotellwebsiteshowtoidentifyvisitorsaseitherhumanorrobot(application).()第8題Thevalueoftheexpressionlen(range(1,9))is9.
(
)第9題InPythonprogramming,theexceptionsthatarethrownbyyourselfarecalledcustomexceptions.
()第1
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 食品安全員生產(chǎn)類考試題庫及答案
- 河北省廊坊市霸州市2024-2025學(xué)年八年級上學(xué)期期末地理試題(含答案)
- 甘肅省慶陽市2024-2025學(xué)年上學(xué)期期末八年級生物與地理試卷-初中地理(含答案)
- 2026年深圳中考語文詞語辨析運(yùn)用試卷(附答案可下載)
- 2026年大學(xué)大二(康復(fù)治療技術(shù))物理因子治療階段測試試題及答案
- 綠茶題目大全及答案
- 2026年深圳中考生物細(xì)菌和真菌專項(xiàng)訓(xùn)練試卷(附答案可下載)
- 零售店培訓(xùn)課件模板
- 道法大題題庫及答案初中
- 2026年深圳中考化學(xué)物質(zhì)的檢驗(yàn)與鑒別試卷(附答案可下載)
- 2026年大連雙D高科產(chǎn)業(yè)發(fā)展有限公司公開選聘備考題庫及答案詳解(奪冠系列)
- 團(tuán)隊(duì)建設(shè)與協(xié)作能力提升工作坊指南
- 人行景觀索橋施工組織設(shè)計(jì)
- 鋼結(jié)構(gòu)加工制造工藝
- 新版高中物理必做實(shí)驗(yàn)?zāi)夸浖捌鞑?(電子版)
- ABAQUS在隧道及地下工程中的應(yīng)用
- 【郎朗:千里之行我的故事】-朗朗千里之行在線閱讀
- 相似件管理規(guī)定
- 病原生物與免疫學(xué)試題(含答案)
- 尼帕病毒專題知識宣講
- 現(xiàn)代企業(yè)管理制度
評論
0/150
提交評論