资源描述:
《Think Python-How to Think Like a Computer Scientist.pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、ThinkPythonHowtoThinkLikeaComputerScientistVersion2.0.1June2012ThinkPythonHowtoThinkLikeaComputerScientistVersion2.0.1June2012AllenDowneyGreenTeaPressNeedham,MassachusettsCopyright©2012AllenDowney.GreenTeaPress9WashburnAveNeedhamMA02492Permissionisgr
2、antedtocopy,distribute,and/ormodifythisdocumentunderthetermsoftheCreativeCommonsAttribution-NonCommercial3.0UnportedLicense,whichisavailableathttp://creativecommons.org/licenses/by-nc/3.0/.TheoriginalformofthisbookisLATEXsourcecode.CompilingthisLATEX
3、sourcehastheeffectofgen-eratingadevice-independentrepresentationofatextbook,whichcanbeconvertedtootherformatsandprinted.TheLATEXsourceforthisbookisavailablefromhttp://www.thinkpython.comPrefaceThestrangehistoryofthisbookInJanuary1999Iwaspreparingtote
4、achanintroductoryprogrammingclassinJava.IhadtaughtitthreetimesandIwasgettingfrustrated.Thefailurerateintheclasswastoohighand,evenforstudentswhosucceeded,theoveralllevelofachievementwastoolow.OneoftheproblemsIsawwasthebooks.Theyweretoobig,withtoomuchu
5、nnecessarydetailaboutJava,andnotenoughhigh-levelguidanceabouthowtoprogram.Andtheyallsufferedfromthetrapdooreffect:theywouldstartouteasy,proceedgradually,andthensomewherearoundChapter5thebottomwouldfallout.Thestudentswouldgettoomuchnewmaterial,toofast
6、,andIwouldspendtherestofthesemesterpickingupthepieces.Twoweeksbeforethefirstdayofclasses,Idecidedtowritemyownbook.Mygoalswere:•Keepitshort.Itisbetterforstudentstoread10pagesthannotread50pages.•Becarefulwithvocabulary.Itriedtominimizethejargonanddefinee
7、achtermatfirstuse.•Buildgradually.Toavoidtrapdoors,Itookthemostdifficulttopicsandsplitthemintoaseriesofsmallsteps.•Focusonprogramming,nottheprogramminglanguage.IincludedtheminimumusefulsubsetofJavaandleftouttherest.Ineededatitle,soonawhimIchoseHowtoThi
8、nkLikeaComputerScientist.Myfirstversionwasrough,butitworked.Studentsdidthereading,andtheyunderstoodenoughthatIcouldspendclasstimeonthehardtopics,theinterestingtopicsand(mostimportant)lettingthestudentspractice.IreleasedthebookundertheGNUFreeDocumentat