Python程序設(shè)計(英語)知到智慧樹期末考試答案題庫2025年中央財經(jīng)大學(xué)_第1頁
Python程序設(shè)計(英語)知到智慧樹期末考試答案題庫2025年中央財經(jīng)大學(xué)_第2頁
Python程序設(shè)計(英語)知到智慧樹期末考試答案題庫2025年中央財經(jīng)大學(xué)_第3頁
Python程序設(shè)計(英語)知到智慧樹期末考試答案題庫2025年中央財經(jīng)大學(xué)_第4頁
Python程序設(shè)計(英語)知到智慧樹期末考試答案題庫2025年中央財經(jīng)大學(xué)_第5頁
已閱讀5頁,還剩8頁未讀, 繼續(xù)免費閱讀

下載本文檔

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

文檔簡介

Python程序設(shè)計(英語)知到智慧樹期末考試答案題庫2025年中央財經(jīng)大學(xué)Withinamethoddefinition,theinstancevariablexcouldbeaccessedviawhichexpression?()

答案:self.xWiththefollowinginput,pleaseselectthecorrectoutputofPythonConsole()message=‘tcsndcontxe’message[5:8]+message[-1]+message[-2]+message[0]

答案:‘conext’Whichstringmethodconvertsallthecharactersofastringtouppercase?()

答案:upperWhichstringmethodconvertsallthecharactersofastringtolowercase?()

答案:lowerWhichoneistrueaboutthefunction?()

答案:Whenafunctiondefinitionhasseveralparameters,theactualparametersarematchedupwiththeformalparametersbyposition.WhichofthefollowingwasNOTaclassintheracquetballsimulation?()

答案:ScoreWhichofthefollowingstatementoutput5.0?()

答案:round(4.6)WhichofthefollowingmethodsispartoftheDieViewclassinthischapter?()

答案:setValueWhichofthefollowingmethodsisNOTpartoftheButtonclassinthischapter?()

答案:setLabelWhichofthefollowingmatchestype(1+2*3.14)?()

答案:Whichofthefollowingisthesameass[0:-1]?()

答案:s[:len(s)-1]WhichofthefollowingisNOToneofthefundamentalcharacteristicsofobject-orienteddesign/programming?()

答案:generalityWhichofthefollowingisnotavalidruleofBooleanalgebra?()

答案:not(aandb)==not(a)andnot(b)WhichofthefollowingisNOTastepinpuretop-downdesign?()

答案:ConstructasimplifiedprototypeofthesystemWhichofthefollowingisnotareasontousefunctions?()

答案:todemonstrateintellectualsuperiorityWhichofthefollowingisnotaPythonlistmethod?()

答案:getWhichofthefollowingisnotalegalidentifier?()

答案:spamWhichofthefollowingisNOTaguidelineforOOD?()

答案:Candidateobjectscanbefoundbylookingattheverbsinaproblemdescription.WhichofthefollowingisNOTadictionarymethod?()

答案:sortWhichofthefollowingisNOTacharacteristicofaPythonlist?()

答案:Itisimmutable.WhichofthefollowingisNOTabuilt-insequenceoperationinPython?()

答案:sortingWhichofthefollowingisnotabuilt-inPythondatatype?()

答案:rationalWhichofthefollowingisnotabuilt-inmethodofPython?()

答案:writelineWhichofthefollowinginformationisincludedinafunction’sinterface?()

答案:name;parameters;expectedreturnvaluesWhichofthefollowingexpressionscorrectlytestsifxiseven?()

答案:x%2==0Whichofthefollowingcomputesthehorizontaldistancebetweenpointsp1andp2?()

答案:abs(p1.getX()-p2.getX())Whichofthefollowingcannotbeusedtoconvertastringofdigitsintoanumber?()

答案:strWhichofthefollowingcanNOTbeexecuted?()

答案:a=(4,3,2,1),thena[1]=2Whichexpressionistrueapproximately66%ofthetime?()

答案:random()<0.66Wheremathematiciansusesubscripting,computerprogrammersuse()

答案:indexingWhenwritingtoafile,makesureyoudonotclobberanyfilesyouwillneedlater.()

答案:對Whenaprogramisbeingrundirectly(notimported),thevalueof__name__is()

答案:__main__Whatisthefundamentalquestionofcomputerscience?()

答案:Whatcanbecomputed?WhatisthedatatypeofserverinanRBallGame?()

答案:PlayerWhatdoes2representforinthefollowingstatement?()print("Thetotalvalueofyourchangeis${0:0.2f}".format(total))

答案:precisionWhatcoloriscolor_rgb(0,255,255)?()

答案:CyanUnlikestrings,Pythonlistsarenotmutable.()

答案:錯UnicodeusesthesamecodesasASCIIforthe125charactersoriginallydefined.()

答案:錯Typically,thedesignprocessinvolvesconsiderabletrialanderror.()

答案:對Typically,thedesignprocessinvolvesconsiderabletrialanderror.()

答案:對Top-downdesignisalsocalledstepwiserefinement.()

答案:對Thereisusuallyonlyonecorrectsolutiontoaprobleminvolvingdecisionstructures.()

答案:錯Thereisnodifferencebetweentwostringmethodss.capitalize()ands.title().()

答案:錯Therearemanydifferentlanguages,butallsharethepropertyofhavingaprecisesyntax(form)andsemantics(meaning).()

答案:對Thetermappliedtohidingdetailsinsideclassdefinitionsis()

答案:encapsulationThesituationwheretwovariablesrefertothesameobjectiscalledaliasing.()

答案:對ThesetValuemethodredefinedinColorDieViewclassisanexampleof()

答案:inheritance;polymorphismThescopeofavariableistheareaoftheprogramwhereitmaybereferenced.()

答案:對Theresultofstatementround(21.6)%6is3.0.()

答案:錯Theresultoflist(range(2,8,2))is()

答案:[2,4,6]Theprocessofdescribingexactlywhatacomputerprogramwilldotosolveaproblemiscalled()

答案:specificationThepatternusedtocomputefactorialsis()

答案:accumulatorTheparametersappearinginthefunctiondefinitionarecalledformalparameters,andtheexpressionsappearinginafunctioncallareknownasactualparameters.()

答案:對Theoutputofthefollowingstatementsis()frommathimportsqrtprint(sqrt(16)*3+1==13)

答案:TrueThemostappropriatedatatypeforstoringthevalueofpiis()

答案:floatThemethodthatallowsustoaccessinformationfromtheinstancevariablesofobjectiscalled().

答案:accessorThemethodthataddsasingleitemtotheendofalistis()

答案:appendTheliteralsfortypeboolare()

答案:True,FalseThelastcharacterofastringsisatpositionlen(s)-1.()

答案:對Theitemslistedintheparenthesesofafunctiondefinitionarecalled()

答案:bothBandCarecorrectTheitemsdictionarymethodreturnsa(n)()

答案:sequenceoftuplesTheinitialstripped-downversioniscalledaprototype.()

答案:對Thefloatvaluesarenotexact,whileintsalwaysare.()

答案:對ThefirstparameterofaPythonmethoddefinitioniscalledthis.()

答案:錯TheeasiestwaytoiteratethroughthelinesofafileinPythonistouseawhileloop.()

答案:錯Thecountedlooppatternusesadefiniteloop.()

答案:對Theconditionx<=y<=zisallowedinPython.()

答案:對Thebestwaytowriteaprogramistoimmediatelytypeinsomecodeandthendebugituntilitworks.()

答案:錯Thearrowsinamodulehierarchychartdepict()

答案:informationflowTakingthesquarerootofanegativevaluewithmath.sqrtproducesa(n)()

答案:ValueError;programcrashStandarddeviationmeasureshowspreadoutadatasetis.()

答案:對Spiraldevelopmentisanalternativetotop-downdesign.()

答案:錯Somemodules,whicharemadetobeimportedandusedbyotherprograms,arereferredtoasstand-aloneprograms.()

答案:錯Pythonpassesparametersbyvalue.()

答案:對Pythonautomaticallyconvertsnumbersfromonedatatypetoanotherincertainsituations.()

答案:對Placingadecisioninsideofanotherdecisionisanexampleof()

答案:nestingOnedifferencebetweenacompilerandinterpreteris()

答案:Acompilerprocessessourcecode.Newobjectsarecreatedbyinvokingaconstructor.()

答案:對Mutabletypessuchaslistsanddictionariescanserveaskeysbecausetheycanbehashed.()

答案:錯Multi-waydecisionsmustbehandledbynestingmultipleif-elsestatements.()

答案:錯Modifyingthelistwhileloopingthroughitcanproducestrangeanomalies.()

答案:對LiHuaforgothisQQpassword,buthestillrememberedthatthepasswordwastheASCIIcodecorrespondingtohisname“LiHua”.Whichofthefollowingisthecorrectone?()

答案:76105327211797Itemscanberemovedfromalistwiththedeloperator.()

答案:對Itisquitecommontocreateaclasswithmanysimplemethodsinwell-modularized,object-orientedprograms.()

答案:對Itisconsideredbadstyletodirectlyaccessaninstancevariableoutsideofaclassdefinition.()

答案:對Instancevariablesgoawayonceamethodterminates.()

答案:錯Intop-downdesign,thesubcomponentsofthedesignare()

答案:functionsIntheracquetballsimulation,whatdatatypeisreturnedbythegameOverfunction?()

答案:boolInPython,x=x+1isalegalstatement.()

答案:對InPython,thebodyofadecisionisindicatedby()

答案:indentationInPython,gettinguserinputisdonewithaspecialexpressioncalled()

答案:inputInPython,afunctioncanreturnonlyonevalue.()

答案:錯InPython,4+5producesthesameresulttypeas4.0+5.0.()

答案:錯InPython“4”+“5”is“45”.()

答案:對InaPythonclass,theconstructoriscalled__init__.()

答案:對Iftherewasnobareexceptattheendofatrystatementandnoneoftheexceptclausesmatch,theprogramwouldstillcrash.()

答案:對Ifthevaluebeingpassedisamutableobject,thenchangesmadetotheobjectmaybevisibletothecaller.()

答案:對Ifn=“nice”,t=”try”,whichofthefollowingoptionswillcauseanerror?()

答案:print([n+t][1])IdentifiersinPythonarenotcase-sensitive.()

答案:錯Identifiersarenames;theybeginwithanunderscoreorletterwhichcanbefollowedbyacombinationofletter,digit,orunderscorecharacters.()

答案:對Hidingthedetailsofanobjectinaclassdefinitioniscalledinstantiation.()

答案:錯Functionsthatdon'texplicitlyreturnavaluereturnthespecialobjectNull.()

答案:錯Fromadesignstandpoint,encapsulationseparatestheconcernsof()

答案:“what”vs.“how”Formalparametersandothervariablesinsidefunctiondefinitionsarelocaltothefunction.()

答案:對Findacorrectalgorithmtosolveaproblemandthenstrivefor()

答案:clarity;simplicity;efficiency;scalabilityDefiniteloopsareloopsthatexecuteaknownnumberoftimes.()

答案:對Computerscangeneratetrulyrandomnumbers.()

答案:錯Bydefault,thesplitmethodwillsplitthestringwhereveraspaceoccurs.()

答案:對Attheendofthefile,thereadline()returnsan“\n”.()

答案:錯Arraysareusuallyheterogeneous,butlistsarehomogeneous.()

答案:錯Anobjectmayhaveonlyoneinstancevariable.()

答案:錯Animportantconsiderationingraphicalprogrammingisthechoiceofanappropriatecoordinatesystem.()

答案:對Allinformationthatacomputeriscurrentlyworkingonisstoredinmainmemory.()

答案:對abs(3)=3.0()

答案:錯Atop-downdesignisbestimplementedfromthetopdown.()

答案:錯Astatementis()

答案:acompletecomputercommandAsinglepointonagraphicsscreeniscalledapixel.()

答案:對Asimulationthatusesprobabilisticeventsiscalled()

答案:MonteCarloAsimpledecisioncanbeimplementedwithanifstatement.()

答案:對Asentinelloopshouldnotactuallyprocessthesentinelvalue.()

答案:對Asentinelloopaskstheuserwhethertocontinueoneachiteration.()

答案:錯APythonwhileimplementsadefiniteloop.()

答案:錯APythonstringliteralcanspanmultiplelinesifenclosedwith()

答案:"""APythonfunctiondefinitionbeginswith()

答案:defAPythondictionaryisakindofsequence.()

答案:錯APythonconventionfordefiningmethodsthatare"private"toaclassistobeginthemethodnamewith()

答案:anunderscore(_)Apseudorandomnumbergeneratorworksbystartingwithaseedvalue.()

答案:對Amultiplechoicequestionismostsimilarto()

答案:multi-waydecisionsAmethodthatchangesthestateofanobjectiscalleda(n)()

答案:mutatorAmethoddefinitionwithfourformalparametersisgenerallycalledwithhowmanyactualparameters?()

答案:threeAmethoddefinitionissimilartoa(n)()

答案:functiondefinitionAloopthatneverterminatesiscalled()

答案:infiniteAloopstructurethatteststheloopconditionafterexecutingtheloopbodyiscalleda()

答案:post-testloopAlooppatternthatcontinuesuntilaspecialvalueisinputiscalleda(n)()

答案:sentinelloopAlooppatternthataskstheuserwhethertocontinueoneachiterationiscalleda(n)()

答案:interactiveloopAloopisusedtoskipoverasectionofa

溫馨提示

  • 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)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論