资源描述:
《像计算机科学家一样思考python(英文版)》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、ThinkPythonHowtoThinkLikeaComputerScientistVersion1.1.22ThinkPythonHowtoThinkLikeaComputerScientistVersion1.1.22AllenDowneyGreenTeaPressNeedham,MassachusettsCopyright©2008AllenDowney.Printinghistory:April2002:FirsteditionofHowtoThinkLikeaComputerScientist.August2007:Majorrevision,changedtitletoHowto
2、ThinkLikea(Python)Programmer.June2008:Majorrevision,changedtitletoThinkPython:HowtoThinkLikeaComputerScientist.GreenTeaPress9WashburnAveNeedhamMA02492Permissionisgrantedtocopy,distribute,and/ormodifythisdocumentunderthetermsoftheGNUFreeDoc-umentationLicense,Version1.1oranylaterversionpublishedbytheF
3、reeSoftwareFoundation;withnoInvariantSections,noFront-CoverTexts,andwithnoBack-CoverTexts.TheGNUFreeDocumentationLicenseisavailablefromwww.gnu.orgorbywritingtotheFreeSoftwareFoundation,Inc.,59TemplePlace,Suite330,Boston,MA02111-1307,USA.TheoriginalformofthisbookisLATEXsourcecode.CompilingthisLATEXso
4、urcehastheeffectofgeneratingadevice-independentrepresentationofatextbook,whichcanbeconvertedtootherformatsandprinted.TheLATEXsourceforthisbookisavailablefromhttp://www.thinkpython.comPrefaceThestrangehistoryofthisbookInJanuary1999IwaspreparingtoteachanintroductoryprogrammingclassinJava.Ihadtaughtitt
5、hreetimesandIwasgettingfrustrated.Thefailurerateintheclasswastoohighand,evenforstudentswhosucceeded,theoveralllevelofachievementwastoolow.OneoftheproblemsIsawwasthebooks.Theyweretoobig,withtoomuchunnecessarydetailaboutJava,andnotenoughhigh-levelguidanceabouthowtoprogram.Andtheyallsufferedfromthetrap
6、dooreffect:theywouldstartouteasy,proceedgradually,andthensomewherearoundChapter5thebottomwouldfallout.Thestudentswouldgettoomuchnewmaterial,toofast,andIwouldspendtherestofthesemesterpickingupthepieces.Twoweeksbeforethefirstdayofclasses,Idecidedtowritemyownbook.Mygoalswere:Keepitshort.Itisbetterforstu
7、dentstoread10pagesthannotread50pages.Becarefulwithvocabulary.Itriedtominimizethejargonanddefineeachtermatfirstuse.Buildgradually.Toavoidtrapdoors,Itookthemostdifficulttopicsandsplitthemintoaseriesofsmall