资源描述:
《think python》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、ThinkPythonHowtoThinkLikeaComputerScientistVersion2.0.12May2013ThinkPythonHowtoThinkLikeaComputerScientistVersion2.0.12May2013AllenDowneyGreenTeaPressNeedham,MassachusettsCopyright©2012AllenDowney.GreenTeaPress9WashburnAveNeedhamMA02492Permissionisgrantedtocopy,distribute
2、,and/ormodifythisdocumentunderthetermsoftheCreativeCommonsAttribution-NonCommercial3.0UnportedLicense,whichisavailableathttp://creativecommons.org/licenses/by-nc/3.0/.TheoriginalformofthisbookisLATEXsourcecode.CompilingthisLATEXsourcehastheeffectofgen-eratingadevice-indep
3、endentrepresentationofatextbook,whichcanbeconvertedtootherformatsandprinted.TheLATEXsourceforthisbookisavailablefromhttp://www.thinkpython.comPrefaceThestrangehistoryofthisbookInJanuary1999IwaspreparingtoteachanintroductoryprogrammingclassinJava.IhadtaughtitthreetimesandI
4、wasgettingfrustrated.Thefailurerateintheclasswastoohighand,evenforstudentswhosucceeded,theoveralllevelofachievementwastoolow.OneoftheproblemsIsawwasthebooks.Theyweretoobig,withtoomuchunnecessarydetailaboutJava,andnotenoughhigh-levelguidanceabouthowtoprogram.Andtheyallsuff
5、eredfromthetrapdooreffect:theywouldstartouteasy,proceedgradually,andthensomewherearoundChapter5thebottomwouldfallout.Thestudentswouldgettoomuchnewmaterial,toofast,andIwouldspendtherestofthesemesterpickingupthepieces.Twoweeksbeforethefirstdayofclasses,Idecidedtowritemyownbo
6、ok.Mygoalswere:•Keepitshort.Itisbetterforstudentstoread10pagesthannotread50pages.•Becarefulwithvocabulary.Itriedtominimizethejargonanddefineeachtermatfirstuse.•Buildgradually.Toavoidtrapdoors,Itookthemostdifficulttopicsandsplitthemintoaseriesofsmallsteps.•Focusonprogramming,
7、nottheprogramminglanguage.IincludedtheminimumusefulsubsetofJavaandleftouttherest.Ineededatitle,soonawhimIchoseHowtoThinkLikeaComputerScientist.Myfirstversionwasrough,butitworked.Studentsdidthereading,andtheyunderstoodenoughthatIcouldspendclasstimeonthehardtopics,theinteres
8、tingtopicsand(mostimportant)lettingthestudentspractice.IreleasedthebookundertheGNUFreeDocumentat