资源描述:
《[Think.Python(2012.8)].Allen.B.Downey.文字版》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、ThinkPythonAllenB.DowneyThinkPythonbyAllenB.DowneyCopyright©2012AllenDowney.Allrightsreserved.PrintedintheUnitedStatesofAmerica.PublishedbyO’ReillyMedia,Inc.,1005GravensteinHighwayNorth,Sebastopol,CA95472.O’Reillybooksmaybepurchasedforeducational,business,orsa
2、lespromotionaluse.Onlineeditionsarealsoavailableformosttitles(http://my.safaribooksonline.com).Formoreinformation,contactourcorporate/institutionalsalesdepartment:800-998-9938orcorporate@oreilly.com.Editors:MikeLoukidesandMeghanBlanchetteProofreader:StacieArel
3、lanoProductionEditor:RachelSteelyCoverDesigner:KarenMontgomeryInteriorDesigner:DavidFutatoIllustrators:RobertRomanoandRebeccaDemarestAugust2012:FirstEditionRevisionHistoryfortheFirstEdition:2012-08-03FirstreleaseSeehttp://oreilly.com/catalog/errata.csp?isbn=97
4、81449330729forreleasedetails.NutshellHandbook,theNutshellHandbooklogo,andtheO’ReillylogoareregisteredtrademarksofO’ReillyMedia,Inc.ThinkPython,theimageofaCarolinaParrot,andrelatedtradedressaretrademarksofO’ReillyMedia,Inc.Manyofthedesignationsusedbymanufacture
5、rsandsellerstodistinguishtheirproductsareclaimedastrademarks.Wherethosedesignationsappearinthisbook,andO’ReillyMedia,Inc.,wasawareofatrademarkclaim,thedesignationshavebeenprintedincapsorinitialcaps.ThinkPythonisavailableundertheCreativeCommonsAttribution-NonCo
6、mmercial3.0UnportedLicense.Theauthormaintainsanonlineversionathttp://thinkpython.com/thinkpython.pdf.Whileeveryprecautionhasbeentakeninthepreparationofthisbook,thepublisherandauthorsassumenoresponsibilityforerrorsoromissions,orfordamagesresultingfromtheuseofth
7、einformationcontainedherein.ISBN:978-1-449-33072-9[LSI]TableofContentsPreface.......................................................................xi1.TheWayoftheProgram......................................................1ThePythonProgrammingLanguage1WhatIs
8、aProgram?3WhatIsDebugging?4SyntaxErrors4RuntimeErrors4SemanticErrors5ExperimentalDebugging5FormalandNaturalLanguages6TheFirstProgram7Debugging8Glossary9Exercises112.Variables,Expre