专业英语听力材料Word格式.docx
- 文档编号:18490696
- 上传时间:2022-12-17
- 格式:DOCX
- 页数:44
- 大小:95.84KB
专业英语听力材料Word格式.docx
《专业英语听力材料Word格式.docx》由会员分享,可在线阅读,更多相关《专业英语听力材料Word格式.docx(44页珍藏版)》请在冰豆网上搜索。
Lecture3前18分钟
Lecture3后17分钟
Lecture4前18分钟
Lecture4后18分钟
Lecture5前17分钟
Lecture5后15分钟
Lecture6前19分钟
Lecture6后15分钟
Lecture7
Lecture8前15分钟
Lecture8第15—30分钟
Lecture8第30—48分钟
Lecture8第48—完
Lecture2前17分钟回首页
Thisiscomputerprogramming1fromtheUniversityofWashington.Welcomeback!
Todayinlecture2,we’llbegoingrightintothetechnicalcontentofthiscourseaswetalkaboutproblems,algorithmsandprograms.Asyoumaybeaware,programmingacomputerinvolvesagreatamountofdetail.We’llhaveplentyoftimelaterinthiscoursetogettoomanyofthosedetails.Butprogrammingalsoinvolveshigherlevelconceptsinproblemsolvingskills.I’dliketofocusonthattoday,lateronwe’llseedetailswhichwillhelpuscarryoutthesehigherlevelproblemsolvingstrategies.Sowe’lltalktodayaboutwhatproblemsmightbesolvedbycomputers,whatalgorithmsareandwhatprogramsare.We’llaboutageneralapproachtosolvingproblemswithcomputersanddiscusshowaresolutionscanbeturnedintocodethataCPUcanactuallyexecute,we’llfocustodayontheselargeideas.Tostartwith,computerprogrammingisprimarilyamatterofusingacomputertosolveaproblemthatmightbeonedefinitionofprogramming,problemsolvingthroughcomputers.Nownotallproblemsthatwerefertobythatnameineverydayusemightbeamenabletosolutionbycomputer.Problemoftrafficjamsduringrushhourforexample,probablycan’tbesolvedbywritingacprogram,andthesamegoesforproblemslikeworldpeaceorworldhunger.Heartofthisartprogrammingisbeabletorecognizewhichproblemsaresuitableforsolutions.Ingeneral,aproblemthatacomputercansolvehastobeoneforwhichyouasaprogrammercancomeupwithanalgorithm.Analgorithmisasequenceofprecisestepswhichwillleadthesolutionoftheproblem.Ifyoucan’tcomeupwiththealgorithmorsequenceofsteps,thenyoucan’tuseacomputertosolvetheproblem.Thesestepshavetobequitpreciseandtheyhavetobemechanicalinthesensethattheywillbecarriedoutbyamachine,thecomputeroncetheprogrammingisdone,ratherthanbyhumanbeing.Notionofthealgorithmisafundamentaloneanditperhapsquitedistinguishescomputersciencefromotherfieldsofscienceandengineering.Certainlyalgorithmsareusedinmanyotherfields,butnoworryexceptioncomputerscienceisthealgorithmitselfofnotion,naturenaturalcharacteristicskeepabilitiesofalgorithmsofcentralareaofstudy.Ifyoucancomeupwithanalgorithm,thenthenextstepisturnthatalgorithmintoacomputerprogram,alotofthiscoursewillbeaboutthatprocesstakingthealgorithmandturnitintoaprogramthatcanbeexecuted.Nowweexpressthesealgorithmsusingwhatwecallaprogramminglanguage,thisisaspecialnotationthatwewillbeabletotranslateintoaformthattheCPUitselfwillbeabletoexecute.OurcoursefocusesontheClanguage,therearemanyotherprogramminglanguagesthatyoumightheardseveralofthem,C++,Java,bothofwhicharequitcloselyrelatedtoCandderive(起源)tranit,othersFORTRAN,Basicyoumayhaveexperiencewith.Let’scompareprogrammingtoanotherkindofalgorithm-makeactivitythatwe’refamiliarwithfromeverydaylife,namelycooking.Solet’stakeatypicalproblem,youarehungry,youneedtoeatsomething,Fudgebrowniesoundsreallygood.Sohereistheproblem:
youwanttomakesomeFudgebrownie.OK,thatcoursebounds(跳跃)tothestatementoftheproblem,thegoal:
makeFudgebrownie,what’sthealgorithm?
Well,incookingwecallthatarecipe,arecipeissomethinglikeopentwobagsofchocolatechipsputtheminthebowl,addtwotablespoonsofflour,stir(搅拌)themtogetherandbakethemintheovenfor3hours,orwhateverthealgorithmis,youmayknowmoreaboutcookingthanIdo.OK,that’sthealgorithmknown,thestepbysteprecipethattellswhatthingstodoinwhatorder.Nowisthatquitlikeaprogram?
Well,notquit,whenwewriteaprogram,wewillbegiven(?
?
)ittoaparticularcomputertoexecuteandwehavetowriteitinalanguageandnotationsthatthecomputerunderstands.Justlikearecipehastobewritteninalanguagethatthe(shouldbean‘a’here)cookunderstands.OK,soImayknowthesestepstogothroughanyingredientsbutI’vegottosaythatinEnglish,inRussian(orlan口误)orinwhateverthelanguagethecookis,you‘vegottousetherightterminology,therightoperationsanddoeverythinginexactlytherightorderbutnotendupwithFudgebrownie.OK,andIstillbehungryandIwanttosolvemyproblem.
Hereisitsprocedurethatmanypeoplefindusefulasageneralstrategyforsolvingproblemswithacomputer.Thefirststepmaybeobviousbutit’sforstating,it’stospecifywhattheproblemis.Now,althoughit’sobvious,it’softenhardtodo.Problemthatyouaregiventosolvebyclient,customer,ateacheraresometimesvague(含糊不清的)andmaytakeconsiderable(这里应该是个类似“额外的”意思的词)amountofthenextstepofprocess,analysis.Studyingtheproblem,understandwhatitreallymeans,whatreallysort,learningmoreaboutit,asmuchasyoucanfindoutaboutit,eventuallyfromthatstudy,youhopeyoucandesignanalgorithmstepbystepprocedurefordesigningtheproblem(此句有误,后面是补充。
),designingthesolutiontotheproblems.Onceyou’vegotthealgorithmfirmlyinmind,youcanthenimplementthealgorithm,thismeanswritingaprogram.Nowit’sreallyonlyatthisstateyouneedknowledgeoftheprogramminglanguage.Soyoucandotheproblemtransactions,theanalysis,thedesignwithoutknowingwhetheryouweregoingtouseCorJava(?
)orFORTRAN,andthenattheimplantationstagebegintranslatingthatanalysisandalgorithmintotheprogramminglanguageyourcomputerwilluse.Areyoudoneyet?
Well,itwouldbeniceifthatwasthelaststep,butit’sveryeasytomakemistakessomewhereinthisprocesssotheprogramthatyouwritehastobetested,verifiedandindoingsoyoumayfindoutitdoesn’tworkexactlyasyouplannedto.Whereisthemistake?
Wellitmightbeintheprogrammingbutyoumayfindoutitwassomeoversetdesignormaybeyouhavetogobackevenafurtherlevel,maybetheanalysiswaswrongortheproblemwasstatedwrongoryoumisunderstoodwhatthepersonwhogivesyoutheproblemwanted.Allofthesethingswillrequirereanalysis,redesigningandfixingtheproblemorhopefullyfixingtheproblemandprogramandtryagain.Itwillkeepprocessinvolvingallofthesesteps.Let’stakeasimpleproblemandapplythisproceduretoit.OK,hereisaproblem:
isagivennumberevenorodd?
Soundssimple?
Yes,itissimple.Whyisitsuchasimpleproblem?
Youmayseenotrealisticallysimpletospendtimeoninacourse.Butactually,it’snotsofarremovefromreallifeproblemsyoumightwanttosolveyouhaveapayrollsystemandyouprintcheckseveryotherweekyouhavetodeterminewhetherthisisapayrollweekornot.Whatabouttheproblemsdeterminingwhetherayearisaleapyear?
Thatisasimilarflavortoit.Beyondthat,inacourselikethis,wasslidetheyareusedtopresentinformation.Itisdifficulttocompletelysolveandpresentcomplicatedproblems.Asoneofthereasonsbytheway,thatwerecommendyoulookintothetextbookforthiscourseoranothertextbookoranotherbookonthissubjectsothatyoucanseelarger,morerealisticandmoreinterestingexamples.Butfornow,thisexamplewillserveuswellandallowsustogothroughallofthestepsrecommendedforproblemsolvingandwhenwe’redonewe’llcomeupwithacompletesolutiontotheproblemincludingcode.SowhatwouldIsaythefirststepwas?
StatetheproblemuponIhavedonethatalready.AndsoIcangoontotheanalysis,andhere,youmaystartthinkingabout,uh,what’sreallymeant?
Whatnumbersareallowed?
IsanegativenumberwhatIneedtogetananswerfor?
Whataboutafractionalnumberlike10.3.Thatevenmakesensetoaskquestionforevenoroddyouhavetoaskyourselfthisquestionoryouperhapsasktheclientorteacherwhogiveyoutheproblem.Whereisthisnumbercomefrom?
Isthisnumberthatfixesforever?
Youhavetothinkaboutthatbeforeyoucanwriteanalgorithmfortheprogram.Thenthereisamorebasicquestionaboutwhatevenoroddmean.Withyourmathematicconcepts,en,mostpeoplerememberthisfromtheirschoolmathematicsbutifyouarenotsurethiswouldbeatimetogobackandlookupandremember,remindyourselfwhatthoseconceptsare.Ihavehadevencollegelevelstudentswith12yearsmathematicsbehindthemnotbesurewhetherzeroisanevenoroddnumber.Sothispossiblehasdoubtinyourmindaboutthesethingsandtheanalysisfaceiswhatitmakessensetofigureoutwhatitreallymeant.Finally,programsaysdeterminingtheanswerbuthowdoyoureportthatanswer.Youwantthecomputertolightupabillboard(广告信息)orspeakaword.Howwastheanswertobereported?
Youhavetosightonthattoo.Thisanalysismightleadyoutorestatetheprobleminmoreprecisetermssolet’strytodothatnow.LetmerestatetheproblemI’mreallygoingtosolveasthis:
giveanintegernumber.OK,sonowI’vepaidonthekindofnumberit’sgonnabe,it’sgonnabeaninteger,anumberwithoutdecimalpoints(小数点).Typedinfromthekeyboardsoit’snotbuiltin,itisn’tsentfromasatellite,okorsomeotherobscuremethodasitgonnabetypedin,ifitisaneven,write“even”onthescreensonowwe’llspecifyhowtheansweristobereported.Andifit’soddwe’aregonnawrite“odd”onthescreensonowwehavemuchmoreprecisedefinitionofwhattheproblemisgoingtobeandwecanproceedtothinkaboutanalgorithm.Sohereistheone,le
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 专业 英语听力 材料