實用IT英語(第4版) 課件 Unit 5 ComputerProgramming_第1頁
實用IT英語(第4版) 課件 Unit 5 ComputerProgramming_第2頁
實用IT英語(第4版) 課件 Unit 5 ComputerProgramming_第3頁
實用IT英語(第4版) 課件 Unit 5 ComputerProgramming_第4頁
實用IT英語(第4版) 課件 Unit 5 ComputerProgramming_第5頁
已閱讀5頁,還剩41頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

ComputerProgrammingUnit5實用IT英語(第4版)INFORMATIONCommunicationsTECHNOLOGYInthisunit,wearefocusingonthefollowingissues.programminglanguage;cross-platform;programmer;compiler;function;variable;instruction;human-readable;machine-readable;object_x0002_orientedprogramming(OOP)OutlineThebasicsofCprogramming.Object-orientedprogramminganditsfeatures.PythonProgrammingLanguage.Tipsonhowtowriteprogramsingoodstyle.Personalitiesofagreatprogrammer.ProfessionalTerminologyDialogue:HowtoChoosetheRightProgrammingLanguagetoStudySection

2ReadingTextA:TheBasicsofCProgrammingTextB:Object-OrientedProgrammingTextC:PythonProgrammingLanguageOccupationalTips:TipsonGoodProgrammingStyleClassActivities:Discussionon10TraitsofaGoodProgrammerCONTENTSSection

1Section

3Section

4Dialogue:HowtoChoosetheRightProgrammingLanguagetoStudy01Directions:Readthefollowingdialogueinpairsandtalkabouttheprogramminglanguages.Situation:Situation:Jessiewantstobeaprogrammer,sosheasksherfriendTomtogivehersomeadviceonhowtochoosetherightprogramminglanguagetostudy.Tom:Soyouarelookingintobecomingaprogrammer?Wheredoyoustart?Jessie:IthinkIamwelleducatedinmathsandamabletostandsittinginfrontofthecomputerforhours.WhatIneedtodonowisjusttolearnsomeprogrammingknowledge.Tom:It’snotassimpleasclickingabuttonthatwillcreateyourveryownprogram.Whenitcomestoprogrammingforthecomputer,thereareabunchofcomputerprogramminglanguagesoutthere.Jessie:IheardthatthethreemostusedprogramminglanguagesoutthereareC++,C#,andJava.Thesethreearetheindustrystandardasofnow.However,thestandardscanchange.HowshallIdealwithit?Dialogue:HowtoChoosetheRightProgrammingLanguagetoStudy01Tom:Well,Idon’tthinkthestandardswillchangegreatly.Jessie:Whatarethedifferencesbetweenthesethreelanguages?Tom:TheoldestofallthreeprogramminglanguagesisC++.C++hasbeenaroundforover20yearsanditisusedmostbythecomputerprogrammingindustry.C++islikedbymanybecauseitoffersallthefeaturesafullobject-orientedprogramminglanguagelikejavaoffers,whilelettingyouchoosewhetheryouwanttoprograminanobject-orientedmanner.Jessie:HowaboutC#?Tom:ThenewestprogramminglanguageoutthereisC#.C#isaprogramminglanguagecreatedbyMicrosoft.ItcanbesummedupasamixbetweenC++andJava.Itisgettingmorepopularastimegoeson.Jessie:I’veheardalotofpeopleareusingJava.WhataboutJava?Tom:Javaisagreatprogramminglanguagejustbecauseithasonefeaturethatneitheroftheothershas.ItcanbeusedthroughaWebbrowseraswell.Thishasearneditalotoffame.AnothergreatthingaboutJavaisthatitiscross-platform.Jessie:Whatdoyoumeanbycross-platform?Dialogue:HowtoChoosetheRightProgrammingLanguagetoStudy01Tom:ItmeansthatapieceofcodewritteninWindowscanbetakenandcompiledunderanotheroperatingsystemsuchasLinuxorApple.Jessie:ItseemsJavawouldbemychoice.Notesprogrammer01clickindustrystandardfeatureobject-oriented02030405面向?qū)ο蟪绦騿T點(diǎn)擊行業(yè)標(biāo)準(zhǔn)功能Webbrowsercross-platform0607跨平臺網(wǎng)頁瀏覽器compile08編譯

Dialogue:HowtoChoosetheRightProgrammingLanguagetoStudySection

2ReadingTextA:TheBasicsofCProgrammingTextB:Object-OrientedProgrammingTextC:PythonProgrammingLanguageOccupationalTips:TipsonGoodProgrammingStyleClassActivities:Discussionon10TraitsofaGoodProgrammerCONTENTSSection

1Section

3Section

4TextA:TheBasicsofCProgramming01IntroductiontotheBasicsofCProgrammingTheCprogramminglanguageisapopularandwidelyusedprogramminglanguageforcreatingcomputerprograms.ProgrammersaroundtheworldembraceCbecauseitgivesmaximumcontrolandefficiencytotheprogrammer.Ifyouareaprogrammerorifyouareinterestedinbecomingaprogrammer,thereareacoupleofbenefitsyougainfromlearningC.Youwillbeabletoreadandwritecodeforalargenumberofplatforms—everythingfrommicrocontrollerstothemostadvancedscientificsystemscanbewritteninC,andmanymodernoperatingsystemsarewritteninC.Thejumptotheobject-orientedC++languagebecomesmucheasier.C++isanextensionofC,anditisnearlyimpossibletolearnC++withoutlearningCfirst.TextA:TheBasicsofCProgramming01WhatisCCisacomputerprogramminglanguage.ThatmeansthatyoucanuseCtocreatelistsofinstructionsforacomputertofollow.Cisoneofthousandsofprogramminglanguagescurrentlyinuse.Chasbeenaroundforseveraldecadesandhaswonwidespreadacceptancebecauseitgivesprogrammersmaximumcontrolandefficiency.Cisaneasylanguagetolearn.Itisabitmorecrypticinitsstylethansomeotherlanguages,butyougetbeyondthatfairlyquickly.Ciswhatiscalledacompiledlanguage.ThismeansthatonceyouwriteyourCprogram,youmustrunitthroughaCcompilertoturnyourprogramintoanexecutablethatthecomputercanrun(execute).TheCprogramisthehuman-readableform,whiletheexecutablethatcomesoutofthecompileristhemachine-readableandexecutableform.WhatthismeansisthattowriteandrunaCprogram,youmusthaveaccesstoaCcompiler.IfyouareusingaUNIXmachine(forexample,ifyouarewritingCGIscriptsinConyourhost’sUNIXcomputerorifyouareastudentworkingonalab’sUNIXmachine),theCcompilerisavailableforfree.Itiscalledeither“cc”or“gcc”andisavailableonthecommandline.Ifyouareastudent,thentheschoolwilllikelyprovideyouwithacompiler—findoutwhattheschoolisusingandlearnaboutit.IfyouareworkingathomeonaWindowsmachine,youaregoingtoneedtodownloadafreeCcompilerorpurchaseacommercialcompiler.AwidelyusedcommercialcompilerisMicrosoft’sVisualC++environment(itcompilesbothCandC++programs).Unfortunately,thisprogramcostsseveralhundreddollars.TextA:TheBasicsofCProgramming01Ifyoudonothavehundredsofdollarstospendonacommercialcompiler,thenyoucanuseoneofthefreecompilersavailableontheWeb.TheSimplestCProgramLet’sstartwiththesimplestpossibleCprogramanduseitbothtounderstandthebasicsofCandtheCcompilationprocess.Typethefollowingprogramintoastandardtexteditor(vioremacsonUNIX,NotepadonWindowsorTeachTextonaMacintosh).Thensavetheprogramtoafilenamedsamp.c.Ifyouleaveoff.c,youwillprobablygetsomesortoferrorwhenyoucompileit,somakesureyourememberthe.c.Also,makesurethatyoureditordoesnotautomaticallyappendsomeextracharacters(suchas.txt)tothenameofthefile.Here’sthefirstprogram.#include<stdio.h>intmain(){printf("Thisisoutputfrommyfirstprogram!\n");return0;}TextA:TheBasicsofCProgramming01Whenexecuted,thisprograminstructsthecomputertoprintouttheline“Thisisoutputfrommyfirstprogram!”thentheprogramquits.Youcan’tgetmuchsimplerthanthat!Tocompilethiscode,takethefollowingsteps.OnaUNIXmachine,typegccsamp.c-osamp(ifgccdoesnotwork,trycc).ThislineinvokestheCcompilercalledgcc,asksittocompilesamp.candasksittoplacetheexecutablefileitcreatesunderthenamesamp.Toruntheprogram,typesamp(or,onsomeUNIXmachines,./samp).OnaDOSorWindowsmachineusingDJGPP,atanMS-DOSprompttypegccsamp.c-osamp.exe.ThislineinvokestheCcompilercalledgcc,asksittocompilesamp.candasksittoplacetheexecutablefileitcreatesunderthenamesamp.exe.Toruntheprogram,typesamp.Ifyouareworkingwithsomeothercompilerordevelopmentsystem,readandfollowthedirectionsforthecompileryouareusingtocompileandexecutetheprogram.Youshouldseetheoutput“Thisisoutputfrommyfirstprogram!”whenyouruntheprogram.Hereiswhathappenedwhenyoucompiledtheprogram.Ifyoumistypetheprogram,iteitherwillnotcompileoritwillnotrun.Iftheprogramdoesnotcompileordoesnotruncorrectly,edititagainandseewhereyouwentwronginyourtyping.Fixtheerrorandtryagain.TextA:TheBasicsofCProgramming01Let’swalkthroughthisprogramandstarttoseewhatthedifferentlinesaredoing.ThisCprogramstartswith#include<stdio.h>.Thislineincludesthe“standardI/Olibrary”intoyourprogram.ThestandardI/Olibraryletsyoureadinputfromthekeyboard(called“standardin”),writeoutputtothescreen(called“standardout”),processtextfilesstoredonthedisk,andsoon.Itisanextremelyusefullibrary.Chasalargenumberofstandardlibrarieslikestdio,includingstring,timeandmathlibraries.Alibraryissimplyapackageofcodethatsomeoneelsehaswrittentomakeyourlifeeasier.Thelineintmain()declaresthemainfunction.EveryCprogrammusthaveafunctionnamedmainsomewhereinthecode.Atruntime,programexecutionstartsatthefirstlineofthemainfunction.InC,the{and}symbolsmarkthebeginningandendofablockofcode.Inthiscase,theblockofcodemakingupthemainfunctioncontainstwolines.TextA:TheBasicsofCProgramming01TheprintfstatementinCallowsyoutosendoutputtostandardout(forus,thescreen).Theportioninquotesiscalledtheformatstringanddescribeshowthedataistobeformattedwhenprinted.Theformatstringcancontainstringliteralssuchas“Thisisoutputfrommyfirstprogram!”,symbolsforcarriagereturns(\n),andoperatorsasplaceholdersforvariables.IfyouareusingUNIX,youcantypeman3printftogetcompletedocumentationfortheprintffunction.Ifnot,seethedocumentationincludedwithyourcompilerfordetailsabouttheprintffunction.Thereturn0;linecausesthefunctiontoreturnanerrorcodeof0(noerror)totheshellthatstartedexecution.NewWords&Expressionsprogramming01programmer02n.硬件n.顯示器;監(jiān)視器0304embraceefficiencyv.抓住(機(jī)會等);欣然接受(提議等)n.效率;效能;功效TextA:TheBasicsofCProgramming01microcontroller05instruction06n.微型控制器n.指令1314libraryfunctionn.程序庫n.函數(shù)cryptic07compiler08adj.神秘的;隱藏的n.編譯器1516carriagereturnoperator回車;換行字符n.操作符executable09commandline10n.可執(zhí)行的;實行的命令行;指令行1718placeholdervariablen.位置標(biāo)志符n.變量append11invoke12v.附加v.調(diào)用19shelln.殼,UNIX操作系統(tǒng)中的一部分,是使用者與系統(tǒng)的界面TextA:TheBasicsofCProgramming01Ⅰ.Fillintheblankswiththerightwords.Exercisescompiledcompilercontrolefficiencyexecutablehuman-readableinstructions

machine-readableprogrammersprogrammingCisacomputer____________language.ThatmeansthatyoucanuseCtocreatelistsof________foracomputertofollow.Cisoneofthousandsofprogramminglanguagescurrentlyinuse.Chasbeenaroundforseveraldecadesandhaswonwidespreadacceptancebecauseitgives________maximum________and________.Ciswhatiscalleda________language.ThismeansthatonceyouwriteyourCprogram,youmustrunitthroughaC________toturnyourprogramintoan________thatthecomputercanrun.TheCprogramisthe_______________form,whiletheexecutablethatcomesoutofthecompileristhe________________andexecutableform.WhatthismeansisthattowriteandrunaCprogram,youmusthaveaccesstoaCcompiler.programminginstructionsprogrammersefficiencycompiledcontrolcompilerexecutablehuman-readablemachine-readableTextA:TheBasicsofCProgramming01Ⅱ.Decidewhetherthefollowingstatementsaretrueorfalse.Exercises()1.BothCandC++areobject-orientedlanguages.()2.AwidelyusedCcompilerisMicrosoft’sVisualC++environment,anditisfreetodownload.()3.AstandardtexteditorforonWindowsoperatingsystemisTextpad.()4.Alibraryisapackageofcodethatsomeoneelsehaswrittenforotherprogrammerstousebysimplyincludingthemintotheircode.()5.EveryCprogrammusthaveafunctionnamedmainatthebeginninginthecodebecauseprogramexecutionstartsfromthemainfunction.FFFTFTextB:Object-OrientedProgramming01Object-Orientedprogramming(OOP)isaprogrammingparadigmthatuses“objects”——datastructuresconsistingofdatafieldsandmethods,andtheirinteractionstodesignapplicationsandcomputerprograms.Programmingtechniquesmayincludefeaturessuchasinformationhiding,dataabstraction,encapsulation,modularity,polymorphism,andinheritance.ManymodernprogramminglanguagesnowsupportOOP,suchasC++,Java,andPython.AsurveybyDeborahJ.Armstrongofnearly40yearsofcomputingliteratureidentifiedanumberof“quarks”,orfundamentalconcepts,foundinthestrongmajorityofdefinitionsofOOP.Theyarethefollowing.ClassDefinestheabstractcharacteristicsofathing(object),includingthething’scharacteristics(itsattributes,fieldsorproperties)andthething’sbehaviors(thethingsitcando,ormethods,operationsorfeatures).Onemightsaythataclassisablueprintorfactorythatdescribesthenatureofsomething.Forexample,theclassDogwouldconsistoftraitssharedbyalldogs,suchasbreedandfurcolor(characteristics),andtheabilitytobarkandsit(behaviors).Classesprovidemodularityandstructureinanobject-orientedcomputerprogram.Thecodeforaclassshouldberelativelyself-contained(generallyusingencapsulation).Collectively,thepropertiesandmethodsdefinedbyaclassarecalledmembers.TextB:Object-OrientedProgramming01ObjectApattern(exemplar)ofaclass.TheclassofDog(Figure5-1)definesallpossibledogsbylistingthecharacteristicsandbehaviorstheycanhave;theobjectLassieisoneparticulardog,withparticularversionsofthecharacteristics.ADoghasfur;Lassiehasbrown-and-whitefur.Figure5-1TheClassofDogTextB:Object-OrientedProgramming01InstanceOnecanhaveaninstanceofaclassoraparticularobject.Theinstanceistheactualobjectcreatedatruntime.Inprogrammerjargon,theLassieobjectisaninstanceoftheDogclass.Thesetofvaluesoftheattributesofaparticularobjectiscalleditsstate.Theobjectconsistsofstateandthebehaviorthat’sdefinedintheobject’sclass.MethodAnobject’sabilities.Inlanguage,methods(sometimesreferredtoas“functions”)areverbs.Lassie,beingaDog,hastheabilitytobark.Sobark()isoneofLassie’smethods.Shemayhaveothermethodsaswell,forexamplesit()oreat()orwalk()orsaveTimmy().Withintheprogram,usingamethodusuallyaffectsonlyoneparticularobject;allDogscanbark,butyouneedonlyoneparticulardogtodothebarking.Messagepassing“Theprocessbywhichanobjectsendsdatatoanotherobjectoraskstheotherobjecttoinvokeamethod.”Alsoknowntosomeprogramminglanguagesasinterfacing.Forexample,theobjectcalledBreedermaytelltheLassieobjecttositbypassinga“sit”messagewhichinvokesLassie’s“sit”method.TextB:Object-OrientedProgramming01Inheritance“Subclasses”aremorespecializedversionsofaclass,whichinheritattributesandbehaviorsfromtheirparentclasses,andcanintroducetheirown.Forexample,theclassDogmighthavesub-classescalledCollie,Chihuahua,andGoldenRetriever.Inthiscase,LassiewouldbeaninstanceoftheColliesubclass.SupposetheDogclassdefinesamethodcalledbark()andapropertycalledfurColor.Eachofitssub-classes(Collie,Chihuahua,andGoldenRetriever)willinheritthesemembers,meaningthattheprogrammeronlyneedstowritethecodeforthemonce.Eachsubclasscanalteritsinheritedtraits.Forexample,theCollieclassmightspecifythatthedefaultfurColorforacollieisbrown-and-white.TheChihuahuasubclassmightspecifythatthebark()methodproducesahighpitchbydefault.Subclassescanalsoaddnewmembers.TheChihuahuasubclasscouldaddamethodcalledtremble().Soanindividualchihuahuainstancewoulduseahigh-pitchedbark()fromtheChihuahuasubclass,whichinturninheritedtheusualbark()fromDog.Thechihuahuaobjectwouldalsohavethetremble()method,butLassiewouldnot,becausesheisaCollie,notaChihuahua.Infact,inheritanceisan“a...isa”relationshipbetweenclasses,whileinstantiationisan“isa”relationshipbetweenanobjectandaclass:aCollieisaDog(“a...isa”),butLassieisaCollie(“isa”).Thus,theobjectnamedLassiehasthemethodsfrombothclassesCollieandDog.TextB:Object-OrientedProgramming01AbstractionAbstractionissimplifyingcomplexrealitybymodelingclassesappropriatetotheproblem,andworkingatthemostappropriatelevelofinheritanceforagivenaspectoftheproblem.Forexample,LassietheDogmaybetreatedasaDogmuchofthetime,aColliewhennecessarytoaccessCollie-specificattributesorbehaviors,andasanAnimal(perhapstheparentclassofDog)whencountingTimmy’spets.AbstractionisalsoachievedthroughComposition.Forexample,aclassCarwouldbemadeupofanEngine,Gearbox,Steeringobjects,andmanymorecomponents.TobuildtheCarclass,onedoesnotneedtoknowhowthedifferentcomponentsworkinternally,butonlyhowtointerfacewiththem,i.e.,sendmessagestothem,receivemessagesfromthem,andperhapsmakethedifferentobjectscomposingtheclassinteractwitheachother.EncapsulationEncapsulationconcealsthefunctionaldetailsofaclassfromobjectsthatsendmessagestoit.Forexample,theDogclasshasabark()method.Thecodeforthebark()methoddefinesexactlyhowabarkhappens(e.g.,byinhale()andthenexhale(),ataparticularpitchandvolume).TextB:Object-OrientedProgramming01Timmy,Lassie’sfriend,however,doesnotneedtoknowexactlyhowshebarks.Encapsulationisachievedbyspecifyingwhichclassesmayusethemembersofanobject.Theresultisthateachobjectexposestoanyclassacertaininterface—thosemembersaccessibletothatclass.Thereasonforencapsulationistopreventclientsofaninterfacefromdependingonthosepartsoftheimplementationthatarelikelytochangeinthefuture,therebyallowingthosechangestobemademoreeasily,thatis,withoutchangestoclients.Forexample,aninterfacecanensurethatpuppiescanonlybeaddedtoanobjectoftheclassDogbycodeinthatclass.Membersareoftenspecifiedaspublic,protectedorprivate,determiningwhethertheyareavailabletoallclasses,sub-classesoronlythedefiningclass.(Subtype)polymorphismPolymorphismallowstheprogrammertotreatderivedclassmembersjustliketheirparentclass’members.Moreprecisely,Polymorphisminobject-orientedprogrammingistheabilityofobjectsbelongingtodifferentdatatypestorespondtomethodcallsofmethodsofthesamename,eachoneaccordingtoanappropriatetype-specificbehavior.IfaDogiscommandedtospeak(),thismayelicitabark().However,ifaPig<code>iscommandedto<code>speak(),thismayelicitanoink().Theybothinheritspeak()fromAnimal,buttheirderivedclassmethodsoverridethemethodsoftheparentclass;thisisOverridingPolymorphism.TextB:Object-OrientedProgramming01DecouplingDecouplingallowsfortheseparationofobjectinteractionsfromclassesandinheritanceintodistinctlayersofabstraction.Acommonuseofdecouplingistopolymorphicallydecoupletheencapsulation,whichisthepracticeofusingreusablecodetopreventdiscretecodemodulesfrominteractingwitheachother.NewWords&Expressionsobject-orientedprogramming(OOP)01class02面向?qū)ο缶幊蘮.類12decouplingn.退耦;解耦;去耦;脫離object03instance04n.對象n.實例0607messagepassinginheritance消息傳遞n.繼承0809abstractionencapsulation消息傳遞n.繼承1011subtypepolymorphism消息傳遞n.繼承05methodn.方法TextB:Object-OrientedProgramming01Ⅰ.Fillintheblankswiththerightwords.Exercisesabstraction class encapsulation inherit instance method messagemethods overriding polymorphism objectThe________Dogwouldconsistoftraitssharedbyalldogs,suchasbreedandfurcolor,andtheabilitytobarkandsit.The________Lassieisoneparticulardog,withparticularversionsofthecharacteristics.ADoghasfur;Lassiehasbrown-and-whitefur.Lassieobjectisan________ofDog.Lassie,beingaDog,hastheabilitytobark.Sobark()isoneofLassie’s________.TheobjectcalledBreedermaytelltheLassietositbypassinga“sit”________whichinvokesLassie’s“sit”________.SupposetheDogclassdefinesamethodcalledbark()andapropertycalledfurColor.Eachofitssub-classes(Collie,Chihuahua,andGoldenRetriever)will________thesemembers,meaningthattheprogrammeronlyneedstowritethecodeforthemonce.classobjectinstancemethodsmessagemethodinheritTextB:Object-OrientedProgramming01ExercisesLassietheDogmaybetreatedasaDogmuchofthetime,itiscalled________.Forexample,theDogclasshasabark()method.Thecodeforthebark()methoddefinesexactlyhowabarkhappens.Timmy,Lassie’sfriend,however,doesnotneedtoknowexactlyhowshebarks.________isachievedbyspecifyingwhichclassesmayusethemembersofanobject.IfaDogiscommandedtospeak(),thismayelicitabark().However,ifaPigiscommandedtospeak(),thismayelicitanoink().Theybothinheritspeak()fromAnimal,buttheirderivedclassmethodsoverridethemethodsoftheparentclass;thisis____________________.Ⅱ.Decidewhetherthefollowingstatementsaretrueorfalse.()1.Object-orientedprogrammingiscommonlyusedinmainstreamsoftwareapplicationdevelopmentsincetheearly1990s.()2.Theconceptsofobjectandinstancearethesame.()3.Aclassdefinestheabstractcharacteristicsofakindofthing,includingitspropertiesandmethods.()4.Instantiationisan“isa”relationshipbetweenclasses,whileinheritanceisan“a…isa”relationshipbetweenanobjectandaclass.()5.Topreventdiscretecodemodulesfrominteractingwitheachother,codeisforbiddentobereused.TFTTFabstractionEncapsulationoverridingpolymorphismTextC:PythonProgrammingLanguage01PythonIntroductionPythonisahighlevellanguage.Itisobject-oriented,interpreted,dynamic,multipurposelanguage.Althoughitisverysimpletolearnbutitisverypowerfulandversatilescriptinglanguage.Itsapproachtoobject-orientedprogrammingissimplebutveryeffective.Itisanideallanguageforscriptingandrapidapplicationdevelopmentinmanyareasonmanyplatforms,duetoitssyntaxanddynamictypingaswellasitsinterpretednature.Inthisarticlethebasicconceptsandfeaturesofpythonlanguageandsystemwillbeintroducedrespectively.PythonisnotmadetoworkonlywithaspecialareasuchasWebprogramming.ItcanbeusedwithWeb,enterprise,3DCAD/CAM,etc.ThereisalsoaremarkablebenefitofPythonwhichmustbementionedthatitdoesn’thavecompilationstepsoitisfasterthanothers.ItalsomakesdevelopmentanddebuggingfastinPython.TextC:PythonProgrammingLanguage01PythonCharacteristicsInterpreted:Pythoniscalledinterpretedbecauseitisprocessedatrun-timebytheinterpreterandthereisnoneedtocompiletheprogrambeforeexecutingit.PythonhasmuchsimilaritywithPERRLandPHP.Interactive:Itisknownasinteractivelanguagebecauseitfacilitateyoutodirectlyinteractwithinterpretertowriteprograms.Object-oriented:ItsupportsOOPsconceptandencapsulatecodeswithobjects,soitisknownasObject-oriented.Bestforbeginners:Itisveryeasytolearnandsupportsthedevelopmentofawiderangeofapplication,soitisalwaysrecommendedfornewbeginnersinprogramming.TextC:PythonProgrammingLanguage01HistorybehindPythonThatwere1980s,intheNationalResearchInstituteofmathematicsandcomputerscienceintheNetherlands,GuidovanRossumcreatedPython.ThislanguageisinfluencedbymanylanguageslikeABC,Modula-3,C,C++,Algol-68,Unixshellandmanyotherscriptinglanguages.Itwasdevelopedinlate1980sandimplementedin1989byGuidovanRossum.Sincethen,ithasbecomeverypopularamongdevelopersandprogramminglanguageanalystsduetoitscleansyntaxproductivity.ABCprogramminglanguageiscalledpredecessorofPythonlanguagewhichiswellknownforitsexceptionhandlingcapabilityandinterfacingwithAmoebaOperatingSystem.Note:ABCimpactedthemostinfluenceonPython.PythoniscopyrightedandmaintainedbyacoreteamundertheguidanceofGuidovanRossum.GuidovanRossum:CreatorofPythonTextC:PythonProgrammingLanguage01Whyisitsopopular?Itisoneofthemostpopularprogramminglanguagestoday.Atpresenttime,inUSA,itisthemostpopularlanguage,eightoutoftenCSdepartmentsand27oftop39teachPythoninintroductoryCScourse.Thereasonbehinditspopularitycanbedefinedas:Itisveryeasytolearn,soalwaysrecommendedforbeginners.Ithasveryfewkey_x0002_words,simplestructureandaclearsyntaxascomparisontootherlanguages.Itisveryeasytouseandunderstandthislanguage.Itscodesareclearlydefinedandvisibletousers.Python’ssourcecodeisveryeasytomaintainandthatisthereasonbehinditssuccess.Itisaportablelanguage.Itcanrunonmultipleplatformsandhasthesameinterfaceonallplatforms.Itprovidesinterfacestoallmajorcommercialdatabases.GuidovanRossum:CreatorofPythonTextC:PythonProgrammingLanguage01Ithasabroadstandardlibrary.Itisitsgreateststrengththatithasaportable,ross_x0002_platformlibrary.Itisamulti-paradigmprogramminglanguagewhichisthebestoneinallofothers,havingthesamequality.ApplicationswritteninPythonTherearesomanyapplicationswritteninPython.?3DCAD/CAM?Audio/Videoapplications?Consoleapplications?Enterprisesapplications?Imageapplications?Fileformats?Internetapplications?Mobileapplications?Officeapplications?ScienceandEducationalapplications?SoftwareDevelopment?SystemAdministrativeApplications腳本語言n.句法;語法網(wǎng)絡(luò)編程n.[計]編譯n.排除錯誤(程序的);排除故障(機(jī)器的)面向?qū)ο缶幊蹋∣bject-OrientedProgramming)TextC:PythonProgrammingLanguage01Python:Inthefuture:Ifyouseetheprogramminglanguageshistoryofrecentyears,yo

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論