




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
Unit5ProgrammingStartwithAI JourneywithAIForwardwithAISTARTWITHAIVariablenamesJOURNEYWITHAIManualReading GettingstartedPassageReading Whatisprogramming?ComparativeReading GettingstartedExtensiveReading FivetipstoimproveyourprogrammingskillsFunReading Canyouunderstandit?FORWARDWITHAIAI’sShow GaoDinganddronesUNIT5ProgrammingLEARNINGOBJECTIVEAfterstudyingthisunit,you’llbeableto:?knowwhatisprogramming?improveyourprogrammingskills?understandonetypicalpartofamanual—gettingstarted?improveyourreadingskills?getmoreinterestedinprogrammingSTARTWITHAIDecidewhetherthevariablenamesarevalid(V)orinvalid(I)accordingtotherules.Ifvalid,write“null”intheReasoncolumn.Ifinvalid,choosethereason.Avalidvariablenameshouldobeythefollowingthreerules:?Itshouldbeonlyonewordbutcanbeverylong.?Itcanuseonlyletters,numbers,andtheunderscore(_)character.?Itcan’tbeginwithanumber.Thecommonreasonsfornamestobeinvalidinclude:a.Specialcharacterslike#arenotallowed.b.Hyphens(-)arenotallowed.c.Itcan’tbeginwithanumber.d.Spacesarenotallowed.Variablename
V/IReasonfavoriteMessageVnullFavorite-Messagefavoritemessage8favoriteMessageFavorite#Messagefavorite_message2IbIdIdIaVnullJOURNEYWITHAI12345ManualReadingPassageReadingComparativeReadingExtensiveReadingFunReading小艾說如今,AI的一個(gè)很重要的應(yīng)用就是智能玩具??吹竭@個(gè)話題,你一定很開心吧。先認(rèn)識(shí)下這個(gè)小家伙Robo,然后設(shè)計(jì)一款你中意的智能玩具吧。ManualReadingJOURNEYWITHAIGettingstarted譯InitialSetupBeforeinstallingRobo,youneedto:?InstalltheRobomobileapponyourmobiledevice(yourmobiledevicemustbeconnectedtoacomputerviaaUSBcable).?DownloadPython3.5.1(oralaterversion)fromtheInternetandrunitonyourcomputer.?ConnecttoWi-Fi.ToinstallRobo,typethefollowingintotheCommandPromptwindow:Notethatthe[camera]optionenablestheprocessingofimagesfromRobo’scamera.StartingupRobo(onaWindowsdevice)1.PlugthemobiledevicecontainingtheRoboappintoyourcomputer.2.OpentheRoboapponthephone.MakesureRoboisonandconnectedtotheappviaWi-Fi.3.Taponthegeariconatthetop-rightcornertoopentheSettingsmenu.4.SwipelefttorevealtheRobooptionandtapthe“EnableRobo”button.5.Onthecomputer,opentheCommandPromptwindow.ManualReadingJOURNEYWITHAI譯“Helloworld”ThisprograminstructsRobotosay“Helloworld”—aperfectwaytointroducebothhimandyoutotheworldofprogramming.Toruntheprogram,usetheCommandPromptwindow.First,changetothe01_basicssub-directoryofthetutorialsdirectory.TypethefollowingandpressEnter:Runtheprogram.Next,typethefollowingandpressEnter:GettingstartedIftheprocesshasbeenfollowedcorrectly,Robowillletyouknowalliswellwiththegreeting“Helloworld”!
Wordsdirectory
n.目錄gear
n.齒輪reveal
v.展現(xiàn);揭露swipe
v.刷;掃tutorial
n.軟件教程ManualReading課
Notes1.gearicon:齒輪圖標(biāo)。齒輪圖標(biāo)經(jīng)常表示“設(shè)置”。2.sub-directory:子目錄。sub-是一個(gè)常見的前綴,表示“在……下面的;次于;低于”,如sub-zero(零度以下的),subway(地鐵)等。ManualReading課ExtendedexerciseThefollowingpicturesshowthedevelopmentoftoys,whicharemoreandmoreadvanced.Whichkindoftoydoyoulikebest?ManualReading1ExtendedexerciseDoatoyrobotyourself.Whatfunctionsdoyouwantittohave?ManualReading2ManualReadingJOURNEYWITHAI入門課初始設(shè)置在安裝Robo之前,您需要:在移動(dòng)設(shè)備上安裝Robo應(yīng)用程序(您的移動(dòng)設(shè)備必須通過USB數(shù)據(jù)線連接到計(jì)算機(jī)上)。從互聯(lián)網(wǎng)上下載Python3.5.1(或更高版本),并在計(jì)算機(jī)上運(yùn)行。連接Wi-Fi。要安裝Robo,請(qǐng)?jiān)诿钐崾痉翱谥墟I入以下命令:注意,[camera]選項(xiàng)可以處理來自Robo攝像頭的圖像。啟動(dòng)Robo(在Windows設(shè)備上)將包含Robo應(yīng)用程序的移動(dòng)設(shè)備連接到計(jì)算機(jī)。打開手機(jī)上的Robo應(yīng)用程序。確保Robo已打開并通過Wi-Fi連接到應(yīng)用程序。點(diǎn)擊右上角的齒輪圖標(biāo)打開設(shè)置菜單。向左輕輕滑動(dòng)以顯示Robo選項(xiàng),然后點(diǎn)擊“啟用Robo”按鈕。在計(jì)算機(jī)上,打開命令提示符窗口。ManualReadingJOURNEYWITHAI課“Helloworld”這個(gè)程序?qū)⒅甘綬obo說“Helloworld”——這是將他和您帶進(jìn)編程世界的完美方式。要運(yùn)行程序,請(qǐng)使用命令提示符窗口。首先,切換到tutorials目錄的01_basics子目錄。鍵入以下內(nèi)容并按回車鍵:運(yùn)行程序。接下來,鍵入以下內(nèi)容并按回車鍵:如果您正確地遵循了這些步驟,Robo會(huì)通過一句問候“Helloworld”讓您知道一切正常。入門JOURNEYWITHAI12345ManualReadingPassageReadingComparativeReadingExtensiveReadingFunReading小艾說你會(huì)編程嗎?你喜歡編程嗎?你熟練掌握了一種編程語(yǔ)言嗎?無論你的答案是肯定還是否定,有一點(diǎn)毫無疑問——編程的思維和能力正變得越來越重要。PassageReadingJOURNEYWITHAI1 Whatdoyouthinkofwhenyouseetheword“programming”?2 Firstofall,theword“coding”mightcometomind.Perhapsyouthink“Amazing!”oryoumightsighandthink“Toodifficultforme—Icouldneverdothat.”O(jiān)rmaybeyoupicturecoolprogrammersquicklytypingmysteriousstreamsof1sand0sonscreens,justastheydoonTV.3 Therealityofprogrammingis,ofcourse,quitedifferent.Programmingistheactofwritingcodesinordertoinstructacomputertodotasks—youmightwanttolookupinformationinfilesortocommunicatewithothercomputers,forexample.Ultimately,theendgoalofprogrammingistocreatesomethingthatwillsolveaspecificproblem.Sohowisthisachieved?Whatisprogramming?譯PassageReadingJOURNEYWITHAI4
Allprogramsusebasicinstructionsasbuildingblocks.Basicprogramminglogiccanbe summarizedas:“Dothis;thendothat.”“Ifthisconditionistrue,performthisaction;otherwise,dothataction.”“Dothisactionthatnumberoftimes.”Youcanthencombinethesebuildingblockstoimplementmoreintricatecommands.Forexample,herearetheprogrammingcodesforasimpleprogramwritteninPython.Startingatthetop,Pythonsoftwarerunseachlineofcode(somelinesarerunonlyifacertainconditionistrueorelsePythonrunssomeotherlines)untilitreachesthebottom.Youmightnotknowanythingaboutprogramming,butyoucouldprobablymakeareasonableguessatwhatthecodesdojustbyreadingthem:譯Whatisprogramming?PassageReadingJOURNEYWITHAI1
passwordFile=open(‘SecretPasswordFile.txt’)2
secretPassword=passwordFile.read()3
print(‘Enteryourpassword.’) typedPassword=input()4
iftypedPassword==secretPassword:5
print(‘AccessGranted’)6
iftypedPassword==‘123456’7
print(‘Yourpasswordistoosimple.’) else:8
print(‘AccessDenied’)6 First,thefileSecretPasswordFile.txtisopened1,andthesecretpasswordinitisread2.Then,theuserispromptedtoinputapassword(fromthekeyboard)3.Thesetwopasswordsarecompared4
andiftheyarethesame,theprogramprintsAccessGrantedonthescreen5.Next,theprogramcheckstoseewhetherthepasswordis1234566
andremindstheprogrammerthatthischoiceisnotgoodforapassword7.Ifthepasswordsdonotmatch,theprogramprintsAccessDeniedonthescreen8.譯Whatisprogramming?
Words&PhrasesWordsimplement
v.執(zhí)行;貫徹instruct
v.指示;命令intricate
adj.錯(cuò)綜復(fù)雜的mysterious
adj.神秘的picture
v.想象;設(shè)想prompt
v.提示;提醒n.(計(jì)算機(jī)屏幕上的)提示reasonable
adj.有道理的;合情理的ultimately
adv.最終PassageReadingPhrasescometomind立刻被想到;突然出現(xiàn)在腦海中l(wèi)ookup(在書或計(jì)算機(jī)中)查詢,查找課
Notes1. Python:一種編程語(yǔ)言。常見的編程語(yǔ)言還有Java,C,C++, VisualBasic.Net,Matlab等。run在文中是“(計(jì)算機(jī)程序)運(yùn)行”而不是“跑步”的意思。print在文中是“(在屏幕上)輸出”而不是“打?。ǖ郊埳希钡囊馑?。AccessGranted表示“訪問通過”,AccessDenied表示“訪問被拒絕”。PassageReading課WordsChoosetheappropriatemeaningofthewordsandthephraseaccordingtothepassage.1PassageReading1cometominda.nevertoforget b.tosuddenlythinkof2picture(v.)a.toimagine b.todraw3intricatea.interesting b.complex4prompta.toasksomeonetodosomething b.tourgesomeonetodosomething5grant(v.)a.toallow b.torefuse
Grammar
Decidewhetherthefollowingstatementsarerealconditionals(R)orunrealconditionals(U).2PassageReading1Ifyouhadarrivedabitearlier,youwouldhaveseenher.2Ifyouhadn’tplayedbasketballintherainyesterday,youwouldn’thavegotsuchaheavycoldnow.3IfIhadabike,Iwouldlendittoyouwithouthesitation.4IfIwereyou,Iwouldtellhimthetruth.5IfIhavefreetimetomorrow,Iwillgotoseeamoviewithyou.GrammarNote條件句:包含條件從句的句子是條件句。有些條件句是可以實(shí)現(xiàn)的,叫作真實(shí)條件句。例如:IfIhavetime,I’llcometoseeyou.有些條件句是假想,叫作虛擬條件句,這時(shí)就要用虛擬語(yǔ)氣。例如:IfIhadenoughmoney,Iwouldbuyavilla.UUUURReadingstrategyUnderlinethesignpostwordsinthefollowingparagraphs.Somearefromthepassage.31Firstofall,theword“coding”mightcometomind.Perhapsyouthink“Amazing!”oryoumightsighandthink“Toodifficultforme—Icouldneverdothat.”O(jiān)rmaybeyoupicturecoolprogrammersquicklytypingmysteriousstreamsof1sand0sonscreens,justastheydoonTV.2Therealityofprogrammingis,ofcourse,quitedifferent.Programmingistheactofwritingcodesinordertoinstructacomputertodotasks—youmightwanttolookupinformationinfilesortocommunicatewithothercomputers,forexample.Ultimately,theendgoalofprogrammingistocreatesomethingthatwillsolveaspecificproblem.Sohowisthisachieved?3EventhoughtheUSenjoysanadvantageinthedevelopmentofalgorithms,China’sedgeliesinitshugebaseofdata.Andwithoutdata,algorithmscan’twork.Therefore,ChinahasnotlaggedbehindothercountriesinthedevelopmentofAI.Instead,itplaysanimportantroleininnovation.4Ittooksometimeforthemedicalcommunitytoacceptthestethoscope(聽診器).ItwillalsotakeawhiletorecognizeAIasafull-fledgedhealthtool—despiteitsvastpotentialtorevolutionizehealthcare.Yet,itissopowerfulthatwhenitwillfinallytakeitsrightfulplaceinhealthcare,itwilldisplacethestethoscopeasitssymbol.PassageReadingExtendedexerciseDiscussthequestioningroups.4PassageReading“123456”istoosimpleaspasswords.“X9v3_1df2ga”mightbetoocomplex.It’snotsmarttouseone’sdateofbirth,butifthepassworddoesn’tmakesense,it’dbeeasytoforget.Howdoyouchooseyourpasswordsandhowdoyoukeeptheminmind?Akindreminder:shareyour“methods”ratherthanyour“realpasswords”withyourgroupmembers.PassageReadingJOURNEYWITHAI1 當(dāng)看到“編程”這個(gè)詞時(shí),你想到了什么?首先,你可能會(huì)想到“代碼”這個(gè)詞。也許你認(rèn)為“太棒了!”或者你可能會(huì)嘆氣,然后想:“這對(duì)我來說太難了,我永遠(yuǎn)也編不了程?!被蛘吣憧赡軙?huì)想象一些很酷的程序員像在電視上一樣,在屏幕上快速輸入1和0的神秘字符串。當(dāng)然,現(xiàn)實(shí)中的編程是完全不同的。編程是指為了指示計(jì)算機(jī)執(zhí)行任務(wù)而編寫代碼的行為。例如,你可能希望在文件中查找信息或與其他計(jì)算機(jī)通信。編程的最終目標(biāo)是創(chuàng)建一些可以解決特定問題的東西。那么這是如何實(shí)現(xiàn)的呢?什么是編程?課PassageReadingJOURNEYWITHAI4 所有程序都使用基本指令作為“積木塊”?;镜木幊踢壿嬁筛爬ㄈ缦拢?/p>
“做這個(gè),然后做那個(gè)?!?/p>
“如果此條件為真,則執(zhí)行這個(gè)操作;否則,執(zhí)行那個(gè)操作。”
“執(zhí)行此操作數(shù)次?!? 然后你可以組合這些積木塊來執(zhí)行更復(fù)雜的命令。例如,下面是用Python編寫的一個(gè)簡(jiǎn)單程序的代碼。從頂部開始,Python軟件運(yùn)行每一行代碼(有些代碼行僅在某個(gè)條件為真時(shí)運(yùn)行,否則Python將運(yùn)行其他代碼行),直到它到達(dá)底部。6 你可能對(duì)編程一無所知,但還是可以通過閱讀下面的代碼來合理地猜測(cè)它們的意思:課什么是編程?PassageReadingJOURNEYWITHAI課什么是編程?1
passwordFile=open(‘SecretPasswordFile.txt’)2
secretPassword=passwordFile.read()3
print(‘Enteryourpassword.’) typedPassword=input()4
iftypedPassword==secretPassword:5
print(‘AccessGranted’)6
iftypedPassword==‘123456’7
print(‘Yourpasswordistoosimple.’) else:8
print(‘AccessDenied’)6 首先,打開SecretPasswordFile.txt文件1,讀取其中的密碼2。然后,程序會(huì)提示用戶輸入密碼(通過鍵盤)3。比較這兩個(gè)密碼4,如果它們相同,程序?qū)⒃谄聊簧巷@示“驗(yàn)證通過”5。接下來,程序檢查密碼是否為1234566,并提醒程序員這不適合作為密碼7。如果密碼不匹配,程序?qū)⒃谄聊簧巷@示“拒絕訪問”8。JOURNEYWITHAI12345ManualReadingPassageReadingComparativeReadingExtensiveReadingFunReading小艾說Python是當(dāng)下非常流行的一種編程語(yǔ)言,尤其是在人工智能領(lǐng)域應(yīng)用廣泛。python這個(gè)詞的原意是“巨蟒”。不過它的意思并不重要,重要的是會(huì)使用它。ComparativeReadingJOURNEYWITHAIYoucandownloadPythonforWindows,macOS,andUbuntuforfreefrom/.?Inthismanual,wetaketheversionofPython3.8.1forWindowsasanexample.NotethatPython3.8.1can’tbeusedonWindowsXPorearlier.?You’llfindPythoninstallerfor64-bitand32-bitcomputersonthewebsite’sdownloadpage,sofirstchoosewhichinstalleryouneed.Ifyouboughtyourcomputerin2007orlater,itismostlikelya64-bitsystem.Otherwise,itmaybea32-bitone.It’squiteeasytofindoutforsure:selectStart>ControlPanel>SystemandcheckwhetherSystemTypesays64-bitor32-bit.?DownloadthePythoninstalleranddouble-clickonit.Gettingstarted譯您可以從http://P/免費(fèi)下載PythonforWindows、macOS和Ubuntu。?在本文中,我們以Python3.8.1forWindows版本為例。請(qǐng)注意,Python3.8.1不能在WindowsXP或更早版本上使用。?您將在網(wǎng)站的下載頁(yè)面上找到64位和32位計(jì)算機(jī)的Python安裝程序,因此首先選擇您需要的安裝程序。如果您在2007年或更高版本購(gòu)買計(jì)算機(jī),它很可能是64位系統(tǒng)。否則,它可能是32位的。很容易確定:選擇開始>控制面板>系統(tǒng),檢查系統(tǒng)類型是64位還是32位。?下載Python安裝程序并雙擊它。機(jī)器翻譯ComparativeReadingJOURNEYWITHAIInstallPythonToinstallPython,followtheinstructionsdisplayedonthescreen.You’llneedto“SelectInstallNowtoinstallPythonwithdefaultsettings”or“ChooseCustomizetoenableordisablefeatures”.Thesetupprocesswillthenstart.Whenit’scomplete,you’llseethenotification“Setupwassuccessful”.譯安裝Python按照屏幕上的提示安裝Python。您需要在“現(xiàn)在使用默認(rèn)設(shè)置安裝”或“個(gè)性化安裝”之間進(jìn)行選擇。然后安裝過程將啟動(dòng)。完成后,您將看到“安裝成功”的通知。人工翻譯GettingstartedComparativeReadingJOURNEYWITHAIStartIDLEWhilethePythoninterpreteristhesoftwarethatrunsyourPythonprograms,theinteractivedevelopmentenvironment(IDLE)softwareiswhereyou’llenteryourprograms,muchlikeyouwouldonawordprocessor.OnWindows7(ornewerversions),clicktheStarticoninthelower-leftcornerofyourscreen,enterIDLEintothesearchbox,andselectIDLE(Python3.8.164-bit)tostartit.譯____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________我的翻譯GettingstartedComparativeReadingJOURNEYWITHAITheInteractiveShellTheIDLEwindowthatappearsshouldbemostlyblankexceptforsometextwhichwilllooklikethis:譯GettingstartedThiswindowiscalledtheinteractiveshell.Ashellisaprogramthatletsyoutypeinstructionsintothecomputer,muchliketheCommandPrompt.Python’sinteractiveshellletsyouenterinstructionsforthePythoninterpretertorun.Thecomputerreadstheinstructionsyouenterandrunsthemimmediately.Forexample,enterprint(‘Helloworld’)intotheinteractiveshellnexttothe>>>prompt:ComparativeReadingJOURNEYWITHAIThenpressENTER.Theinteractiveshellshoulddisplaythisinresponse:譯Gettingstarted
Words&PhrasesWordsdefault
n.默認(rèn)狀態(tài)interactive
adj.交互式的notification
n.通知ComparativeReadingPhrasesforsure肯定地;確定地inresponse響應(yīng);回答課
Notes1. Windows,macOS,Ubuntu:它們都是計(jì)算機(jī)操作系統(tǒng)。 Windows是微軟公司開發(fā)的、目前使用最廣泛的操作系統(tǒng); macOS是蘋果電腦的操作系統(tǒng);Ubuntu是一個(gè)以桌面應(yīng)用為
主的Linux操作系統(tǒng)。2.
本文中出現(xiàn)了很多計(jì)算機(jī)專業(yè)術(shù)語(yǔ):controlpanel(控制面板),enter(輸入;回車鍵),installer(安裝程序), prompt(提示符),searchbox(搜索框)等。3. lower-leftcorner:左下角。相反地,右上角是upper-rightcorner。ComparativeReading課WordsandstructureFillintheblankswiththecomputertermsintheboxes.1ComparativeReadingcontrolpanel1Ifyouwanttoadjustyoursoundsettings,gotothe____________anddouble-clickonSoundsforalistofsoundsettings.2Ifyouwanttousethissoftware,justdownloadits____________fromthecompany’swebsite.3Wedon’thaveapaperform,soplease____________yournameandtelephonenumberintothecomputer.4Beforeyougointoyouraccount,youshouldgeta(n)____________
toenterauser’snameandapassword.5It’sagreathelptohavea(n)____________towritemyreportwith.enterinstallerpromptcontrolpanelwordprocessorinstallerenterpromptwordprocessorReadingcomprehensionRearrangethefollowingstatementsaccordingtothemanual.2ComparativeReadinga.EnterIDLEintothesearchboxtostartIDLE.b.Enterprint(‘Helloworld’)intotheinteractiveshellnexttothe>>>prompt.c.Checkthesystemtoseewhetheritis32-bitor64-bit.d.PressENTER.Theinteractiveshelldisplays“Helloworld”.e.FollowtheinstructionstoinstallPython.f.DownloadthePythoninstallerfromthewebsite.Theorderis_____________________________.c—f—e—a—b—d1TranslationTranslatethefollowingparagraphandcompareyourtranslationwiththemachinetranslation.3You’llfindPythoninstallerfor64-bitand32-bitcomputersonthewebsite’sdownloadpage,sofirstchoosewhichinstalleryouneed.Ifyouboughtyourcomputerin2007orlater,itismostlikelya64-bitsystem.Otherwise,itmaybea32-bitone.It’squiteeasytofindoutforsure:selectStart>ControlPanel>SystemandcheckwhetherSystemTypesays64-bitor32-bit.ComparativeReading您將在網(wǎng)站的下載頁(yè)面上找到64位和32位計(jì)算機(jī)的Python安裝程序,因此首先選擇您需要的安裝程序。如果您在2007年或更高版本購(gòu)買計(jì)算機(jī),它很可能是64位系統(tǒng)。否則,它可能是32位的。很容易確定:選擇開始>控制面板>系統(tǒng),檢查系統(tǒng)類型是64位還是32位。機(jī)器翻譯我的翻譯您將在網(wǎng)站的下載頁(yè)面上找到64位和32位計(jì)算機(jī)的Python安裝程序。因此,首先選擇您需要的安裝程序。如果您是在2007年或之后購(gòu)買的計(jì)算機(jī),就很可能是64位系統(tǒng),否則可能是32位的。這個(gè)很容易確定:選擇開始>控制面板>系統(tǒng),查看系統(tǒng)類型是64位還是32位。ComparativeReadingJOURNEYWITHAI您可以從/上免費(fèi)下載Windows、macOS和Ubuntu版本的Python。在本說明書中,我們以Windows版本的Python3.8.1為例。注意Python3.8.1不能在WindowsXP或更早版本上使用。您將在網(wǎng)站的下載頁(yè)面上找到64位和32位計(jì)算機(jī)的Python安裝程序。因此,首先選擇您需要的安裝程序。如果您是在2007年或之后購(gòu)買的計(jì)算機(jī),就很可能是64位系統(tǒng),否則可能是32位的。這個(gè)很容易確定:選擇開始>控制面板>系統(tǒng),查看系統(tǒng)類型是64位還是32位。下載Python安裝程序并雙擊。入門課ComparativeReadingJOURNEYWITHAI安裝Python按照屏幕上的提示安裝Python。您需要在“現(xiàn)在使用默認(rèn)設(shè)置安裝”或“個(gè)性化安裝”之間進(jìn)行選擇。然后安裝過程將啟動(dòng)。完成后,您將看到“安裝成功”的通知。課入門ComparativeReadingJOURNEYWITHAI啟動(dòng)IDLE雖然Python解釋器是運(yùn)行Python程序的軟件,但交互式開發(fā)環(huán)境(IDLE)軟件是您輸入程序的地方,這與您使用文字處理程序相似。在Windows7(或更新版本)上,單擊屏幕左下角的開始圖標(biāo),在搜索框中輸入IDLE,然后選擇IDLE(Python3.8.164位)以啟動(dòng)。課入門ComparativeReadingJOURNEYWITHAI交互式ShellIDLE窗口大部分應(yīng)為空,但會(huì)顯示一些文本,如下圖所示:課這個(gè)窗口稱為交互式環(huán)境。它是一個(gè)程序,允許您在計(jì)算機(jī)中輸入指令,就像命令提示符一樣。Python的交互式環(huán)境允許您輸入由Python解釋器運(yùn)行的指令。計(jì)算機(jī)讀取您輸入的指令并立即運(yùn)行它們。例如,在>>>提示符旁邊的交互式Shell中輸入以下內(nèi)容:入門ComparativeReadingJOURNEYWITHAI然后按下回車鍵。交互式環(huán)境應(yīng)顯示以下內(nèi)容作為響應(yīng):課入門JOURNEYWITHAI12345ManualReadingPassageReadingComparativeReadingExtensiveReadingFunReading小艾說提高編程技能有訣竅,下面五條請(qǐng)你來瞧一瞧。希望你能逐漸進(jìn)階成為編程高手!ExtensiveReadingJOURNEYWITHAIDevelopersshouldalwaysbestrivingtodeveloptheirprogrammingskills,sothattheycankeepaheadofthecurveinacompetitiveindustry.Herearefivetoptipstohelpyousucceedinyourprogramminggoals. Practicemakesperfect!2
Takeeveryopportunitytoworkonyourcodingskills.Whenyouhavemasteredthesyntaxandstructureofaprogramminglanguage,yournextgoalshouldbetopracticeit.Tobecomeagoodprogrammer,youmustbeabletoidentifyanyerrorsonyourconsole.Debuggingisnotonlygoodpractice,itcanbegreatfuntoo.Don’tstopimmediatelyaftersolvingtheproblem:it’sbettertothrowawayyourfirstsolutionasthatisjustaprototype.Yournextsolutionshouldaddressanyissuesormissingelementsyouidentifiedwhenyouwereworkingonyourprototype.Fivetipstoimproveyourprogrammingskills譯ExtensiveReadingJOURNEYWITHAI Docodereview.3 Codereviewhelpsboththereviewerandtheauthor.Thereviewerimproveshisknowledgeofcoding,whiletheauthorreceivesgenuineadviceandtheopportunitytolearnfromhismistakes.4 Ifyouareluckyenoughtogetthechancetoworkforacompanywhichhasunittestingandcodereviewaspartofitsdevelopmentprocess,youwillhavetheopportunitytohoneyourprogrammingskills.譯FivetipstoimproveyourprogrammingskillsExtensiveReadingJOURNEYWITHAI
Readrelevantbooks.5 Apartfromlearningyourprogramminglanguage,itisimportanttoreadbooksonanalyticalthinking,problem-solving,reasoning,etc.Therearethousandsofwellwrittenbooksonallofthesetopics,sochoosetheonewhichbestmeetsyourneeds.Itisalwayswisetostartwithabasicbookandworkyourwayuptowardamoreadvancedone.TherearefreeresourcesontheInternetaswell,suchasforums,blogsandopensourcecodes.Thesecanbeusefulmaterialsforlearningprogrammingtoo.譯FivetipstoimproveyourprogrammingskillsExtensiveReadingJOURNEYWITHAI Thinkconditionally.6 Programmingis,toagreatextent,aboutconditionsandloopingwiththoseconditions.Creatinglogicrequiresyoutothinkconditionally.Thekeyfeatureofconditionallogicisthatconditionsarerepeatableandcanoccuragainandagain.Startbypracticingsimpleconditionsandthengoforhypothesisandtheoriesonconditionalreasoningandlogicalthinking. Exerciseyourbrainbyplayinggames.7 Brainchallenginggameslikechess,Rubik’scubesandSudokucanimprovecreativeandproblem-solvingabilities.Playingthesegamesatayoungageaidsfuturebraindevelopment.Asadeveloper,youcanpracticethembothforentertainmentandtotrainyourbrain.8 Becomingabetterprogrammertakespatienceandlotsofpractice.Staymotivatedbysettingyourselfmanageablegoalsandaskforhelpwhenyouneedit.Goodluckandhappycoding!譯Fivetipstoimproveyourprogrammingskills
Words&PhrasesWordsaddress
v.(著手)解決;處理(問題)analytical
adj.分析的conditionally
adv.有條件地console
n.控制臺(tái);操作臺(tái)debug
v.調(diào)試;排除(計(jì)算機(jī)程序中的)錯(cuò)誤/故障forum
n.論壇genuine
adj.真實(shí)的hypothesis
n.假設(shè);假說loop
v.把……繞成圈motivated
adj.積極的;主動(dòng)的syntax
n.句法Phrasesaheadofthecurve領(lǐng)先;超前apartfrom除了toagreatextent在很大程度上ExtensiveReading課ExtensiveReading1 Whenyoudebugaproblem,youshouldimmediatelygotothenextbug.2 Codereviewisgoodforboththereviewerandtheauthor.3 Therearethousandsofbooksaboutprogramming,andyoushouldstart withthehardestone.4 Developersshouldhavethehabitofthinkingconditionally.5 Playinggameslikechess,Rubik’scubesandSudokuisonlyusefulfor youngdevelopers.ReadingcomprehensionDecidewhetherthefollowingstatementsaretrue(T)orfalse(F).1FTFTFExtensiveReadingExtendedexerciseDiscussthequestioningroups:canyouaddmoretipstoimproveprogrammingskills
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 財(cái)務(wù)管理如何進(jìn)行時(shí)間管理
- 2025電商平臺(tái)店鋪合同轉(zhuǎn)讓協(xié)議
- 醫(yī)用品銷售合同范本
- 住院醫(yī)師規(guī)范化培訓(xùn)-婦產(chǎn)科學(xué)真題庫(kù)-19
- 胎盤滯留出血護(hù)理查房
- 透析患者血脂異常及護(hù)理
- 季羨林短篇小說
- 質(zhì)檢培訓(xùn)工作總結(jié)
- 香港公司租賃合同范本
- 轉(zhuǎn)讓股權(quán)協(xié)議合同
- (一模)2025年廣州市普通高中畢業(yè)班綜合測(cè)試(一)英語(yǔ)試卷(含答案詳解)
- 2025年河南資本集團(tuán)招聘筆試參考題庫(kù)含答案解析
- 《十萬個(gè)為什么》整本書閱讀-課件-四年級(jí)下冊(cè)語(yǔ)文(統(tǒng)編版)
- 走近湖湘紅色人物智慧樹知到答案2024年湖南工商大學(xué)
- 【崗位管理】保利地產(chǎn)集團(tuán)職位說明書
- PRS-761-313技術(shù)使用說明書
- 燃?xì)夤こ虒I(yè)中級(jí)職稱理論考試題庫(kù)-建設(shè)工程專業(yè)中級(jí)職稱理論考試題庫(kù)
- 鐵路建設(shè)項(xiàng)目施工企業(yè)信用評(píng)價(jià)辦法(鐵總建設(shè)〔2018〕124號(hào))
- 鴿巢問題(例1、例2)[1]
- 完整版佛教葬禮儀式
- 【課件】第六章 模型或原型的制作課件-高中通用技術(shù)蘇教版(2019)必修《技術(shù)與設(shè)計(jì)1》
評(píng)論
0/150
提交評(píng)論