Python程序設計(英語)知到智慧樹章節(jié)測試課后答案2024年秋中央財經(jīng)大學_第1頁
Python程序設計(英語)知到智慧樹章節(jié)測試課后答案2024年秋中央財經(jīng)大學_第2頁
Python程序設計(英語)知到智慧樹章節(jié)測試課后答案2024年秋中央財經(jīng)大學_第3頁
Python程序設計(英語)知到智慧樹章節(jié)測試課后答案2024年秋中央財經(jīng)大學_第4頁
免費預覽已結束,剩余4頁可下載查看

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

Python程序設計(英語)知到智慧樹章節(jié)測試課后答案2024年秋中央財經(jīng)大學第一章單元測試

Whatisthefundamentalquestionofcomputerscience?()

A:Whatisthemosteffectiveprogramminglanguage?B:Howfastcanacomputercompute?C:Whatcanbecomputed?D:Howmuchmoneycanaprogrammermake?

答案:Whatcanbecomputed?Astatementis()

A:aprecisedescriptionofaproblemB:atranslationofmachinelanguageC:asectionofanalgorithmD:acompletecomputercommand

答案:acompletecomputercommandTheitemslistedintheparenthesesofafunctiondefinitionarecalled()

A:parametersB:bothBandCarecorrectC:argumentsD:parentheticals

答案:bothBandCarecorrectAllinformationthatacomputeriscurrentlyworkingonisstoredinmainmemory.()

A:錯B:對

答案:對Aloopisusedtoskipoverasectionofaprogram.()

A:對B:錯

答案:錯

第二章單元測試

Whichofthefollowingisnotalegalidentifier?()

A:spamB:spAmC:2spamD:spam4U

答案:spamInPython,gettinguserinputisdonewithaspecialexpressioncalled()

A:forB:simultaneousassignmentC:inputD:read

答案:inputTheprocessofdescribingexactlywhatacomputerprogramwilldotosolveaproblemiscalled()

A:DesignB:implementationC:specificationD:programming

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

A:錯B:對

答案:對Thebestwaytowriteaprogramistoimmediatelytypeinsomecodeandthendebugituntilitworks.()

A:錯B:對

答案:錯

第三章單元測試

Whichofthefollowingisnotabuilt-inPythondatatype?()

A:intB:rationalC:floatD:string

答案:rationalThemostappropriatedatatypeforstoringthevalueofpiis()

A:stringB:intC:floatD:irrational

答案:floatThepatternusedtocomputefactorialsis()

A:accumulatorB:input,process,outputC:plaidD:countedloop

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

A:錯B:對

答案:錯Definiteloopsareloopsthatexecuteaknownnumberoftimes.()

A:錯B:對

答案:對

第四章單元測試

Amethodthatchangesthestateofanobjectiscalleda(n)()

A:constructorB:mutatorC:functionD:accessor

答案:mutatorWhichofthefollowingcomputesthehorizontaldistancebetweenpointsp1andp2?()

A:abs(p1.getX()-p2.getX())B:p2.getX()-p1.getX()C:abs(p1-p2)D:abs(p1.getY()-p2.getY())

答案:abs(p1.getX()-p2.getX())Whatcoloriscolor_rgb(0,255,255)?()

A:MagentaB:CyanC:YellowD:Orange

答案:CyanThesituationwheretwovariablesrefertothesameobjectiscalledaliasing.()

A:對B:錯

答案:對Asinglepointonagraphicsscreeniscalledapixel.()

A:錯B:對

答案:對

第五章單元測試

Whichofthefollowingisthesameass[0:-1]?()

A:s[-1]B:s[:]C:s[0:len(s)]D:s[:len(s)-1]

答案:s[:len(s)-1]Whichofthefollowingcannotbeusedtoconvertastringofdigitsintoanumber?()

A:floatB:evalC:intD:str

答案:strWhichstringmethodconvertsallthecharactersofastringtouppercase?()

A:uppercaseB:upperC:capwordsD:capitalize

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

A:錯B:對

答案:對Thelastcharacterofastringsisatpositionlen(s)-1.()

A:錯B:對

答案:對

第六章單元測試

APythonfunctiondefinitionbeginswith()

A:defineB:defC:defunD:function

答案:defWhichofthefollowingisnotareasontousefunctions?()

A:tomakeaprogrammoremodularB:toreducecodeduplicationC:tomakeaprogrammoreself-documentingD:todemonstrateintellectualsuperiority

答案:todemonstrateintellectualsuperiorityAfunctionwithnoreturnstatementreturns()

A:nothingB:NoneC:itsparametersD:itsvariables

答案:NoneThescopeofavariableistheareaoftheprogramwhereitmaybereferenced.()

A:錯B:對

答案:對InPython,afunctioncanreturnonlyonevalue.()

A:對B:錯

答案:錯

第七章單元測試

InPython,thebodyofadecisionisindicatedby()

A:parenthesesB:curlybracesC:indentationD:acolon

答案:indentationPlacingadecisioninsideofanotherdecisionisanexampleof()

A:nestingB:procrastinationC:spooningD:cloning

答案:nestingFindacorrectalgorithmtosolveaproblemandthenstrivefor()

A:clarityB:simplicityC:scalabilityD:efficiency

答案:clarity;simplicity;scalability;efficiencySomemodules,whicharemadetobeimportedandusedbyotherprograms,arereferredtoasstand-aloneprograms.()

A:錯B:對

答案:錯Iftherewasnobareexceptattheendofatrystatementandnoneoftheexceptclausesmatch,theprogramwouldstillcrash.()

A:錯B:對

答案:對

第八章單元測試

Alooppatternthataskstheuserwhethertocontinueoneachiterationiscalleda(n)()

A:infiniteloopB:end-of-fileloopC:interactiveloopD:sentinelloop

答案:interactiveloopAloopthatneverterminatesiscalled()

A:busyB:infiniteC:indefiniteD:tight

答案:infiniteWhichofthefollowingisnotavalidruleofBooleanalgebra?()

A:(TrueorFalse)==TrueB:not(aandb)==not(a)andnot(b)C:(Trueorx)==TrueD:aand(borc)==(aandb)or(aandc)

答案:not(aandb)==not(a)andnot(b)Thecountedlooppatternusesadefiniteloop.()

A:對B:錯

答案:對Asentinelloopshouldnotactuallyprocessthesentinelvalue.()

A:錯B:對

答案:對

第九章單元測試

()

A:random()<0.66B:random()<66C:random()>=0.66D:random()>=66

答案:random()<0.66Thearrowsinamodulehierarchychartdepict()

A:logisticflowB:informationflowC:one-waystreetsD:controlflow

答案:informationflowIntheracquetballsimulation,whatdatatypeisreturnedbythegameOverfunction?()

A:floatB:intC:stringD:bool

答案:boolApseudorandomnumbergeneratorworksbystartingwithaseedvalue.()

A:錯B:對

答案:對Spiraldevelopmentisanalternativetotop-downdesign.()

A:對B:錯

答案:錯

第十章單元測試

Amethoddefinitionissimilartoa(n)()

A:loopB:importstatementC:moduleD:functiondefinition

答案:functiondefinitionWhichofthefollowingmethodsisNOTpartoftheButtonclassinthischapter?()

A:activateB:deactivateC:clickedD:setLabel

答案:setLabelWhichofthefollowingmethodsispartoftheDieViewclassinthischapter?()

A:clickedB:setValueC:activateD:setColor

答案:setValueNewobjectsarecreatedbyinvokingaconstructor.()

A:錯B:對

答案:對

A:錯B:對

答案:錯

第十一章單元測試

Themethodthataddsasingleitemtotheendofalistis()

A:addB:appendC:plusD:extend

答案:appendWhichofthefollowingexpressionscorrectlytestsifxiseven?()

A:x%2==xB:even(x)C:x%2==0D:notodd(x)

答案:x%2==0Itemscanberemovedfroma

溫馨提示

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

評論

0/150

提交評論