资源描述:
《[Allen_B._Downey]_Think_Python_An_Introduction_to(BookFi.org)》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、ThinkPythonHowtoThinkLikeaComputerScientistVersion1.1.19ThinkPythonHowtoThinkLikeaComputerScientistVersion1.1.19AllenDowneyGreenTeaPressNeedham,MassachusettsCopyright©2008AllenDowney.Printinghistory:April2002:FirsteditionofHowtoThinkLikeaComputerScientist.August2007:Major
2、revision,changedtitletoHowtoThinkLikea(Python)Programmer.June2008:Majorrevision,changedtitletoThinkPython:HowtoThinkLikeaComputerScientist.GreenTeaPress9WashburnAveNeedhamMA02492Permissionisgrantedtocopy,distribute,and/ormodifythisdocumentunderthetermsoftheGNUFreeDoc-umen
3、tationLicense,Version1.1oranylaterversionpublishedbytheFreeSoftwareFoundation;withnoInvariantSections,noFront-CoverTexts,andwithnoBack-CoverTexts.TheGNUFreeDocumentationLicenseisavailablefromwww.gnu.orgorbywritingtotheFreeSoftwareFoundation,Inc.,59TemplePlace,Suite330,Bos
4、ton,MA02111-1307,USA.TheoriginalformofthisbookisLATEXsourcecode.CompilingthisLATEXsourcehastheeffectofgeneratingadevice-independentrepresentationofatextbook,whichcanbeconvertedtootherformatsandprinted.TheLATEXsourceforthisbookisavailablefromhttp://www.thinkpython.comPrefa
5、ceThestrangehistoryofthisbookInJanuary1999IwaspreparingtoteachanintroductoryprogrammingclassinJava.IhadtaughtitthreetimesandIwasgettingfrustrated.Thefailurerateintheclasswastoohighand,evenforstudentswhosucceeded,theoveralllevelofachievementwastoolow.OneoftheproblemsIsawwa
6、sthebooks.Theyweretoobig,withtoomuchunnecessarydetailaboutJava,andnotenoughhigh-levelguidanceabouthowtoprogram.Andtheyallsufferedfromthetrapdooreffect:theywouldstartouteasy,proceedgradually,andthensomewherearoundChapter5thebottomwouldfallout.Thestudentswouldgettoomuchnewm
7、aterial,toofast,andIwouldspendtherestofthesemesterpickingupthepieces.Twoweeksbeforethefirstdayofclasses,Idecidedtowritemyownbook.Mygoalswere:Keepitshort.Itisbetterforstudentstoread10pagesthannotread50pages.Becarefulwithvocabulary.Itriedtominimizethejargonanddefineeachtermat
8、firstuse.Buildgradually.Toavoidtrapdoors,Itookthemostdifficulttopicsandsplitthemintoaseriesofsmall