Placeholder Image

字幕列表 影片播放

由 AI 自動生成
  • behind all of the software that we use on a daily basis.

    我們日常使用的所有軟件的背後。

  • There's a code being run with all sorts of different terms and symbols.

    有一個代碼正在運行,有各種不同的術語和符號。

  • Surprisingly, it can often be broken down into three simple programming structures called sequences, selections and loops.

    出乎意料的是,它通常可以被分解成三種簡單的編程結構,分別稱為序列、選擇和循環。

  • These come together to form the most basic instructions and algorithms for all sorts of software.

    這些彙集在一起就形成了各種軟件最基本的指令和算法。

  • A sequence is a Siris of actions that air completed in a specific order.

    序列是指按特定順序完成的一系列動作。

  • Action one is performed, then action two, then three, etcetera, until all of the actions in the sequence have been carried out.

    先執行動作一,再執行動作二,再執行動作三,依此類推,直到序列中的所有動作都執行完畢。

  • A sequence we do every day is a morning routine.

    我們每天做的一個順序就是晨練。

  • You might wake up, drink some water, take a shower, eat breakfast and so on.

    你可能會醒來,喝些水,洗個澡,吃早餐等等。

  • Everyone's routine is different, but they're all made up of a sequence of various actions.

    每個人的套路都不一樣,但都是由一連串的各種動作組成的。

  • Selections are a bit different.

    選擇上有些不同。

  • Instead of following a specific order of events, they ask a question in order to figure out which path to take Next.

    他們不是按照特定的事件順序,而是提出一個問題,以弄清下一步該走哪條路。

  • Let's say you go to brush your teeth and you find that you're out of toothpaste.

    比方說,你去刷牙,發現牙膏用完了。

  • You then ask, Do I have any more toothpaste?

    你又問,我還有牙膏嗎?

  • If the answer is no, then you would add it to your shopping list.

    如果答案是否定的,那麼你會把它加入到你的購物清單中。

  • But if the answer is yes, then you would just use the toothpaste.

    但如果答案是肯定的,那你就用牙膏就可以了。

  • This is really all a selection is doing.

    這其實就是一個選題的全部工作。

  • Answering a question based on what it finds.

    根據發現的情況回答問題。

  • The third programming structure is a loop like selections.

    第三種編程結構是類似循環的選題。

  • Loops also ask questions.

    循環也會提出問題。

  • However.

    然而,

  • The difference is, they ask the same question over and over and over again until a certain task is complete.

    不同的是,他們會一遍又一遍地問同一個問題,直到完成某項任務。

  • For example, take the act of hammering a nail.

    比如說,拿錘擊釘子的行為來說。

  • Even though you may not realize it, you're constantly asking yourself.

    儘管你可能沒有意識到,你在不斷地問自己。

  • Is the nail all the way in when the answer is no, you hammer the nail again.

    釘子是不是全部釘進去了,當答案是否定的時候,你再敲一下釘子。

  • You continue to repeat this question until the answer is yes, and then you stop loops.

    你繼續重複這個問題,直到答案是肯定的,然後你停止循環。

  • Allow programmers to efficiently code repetitive tasks instead of having to write the same actions over and over again.

    允許程序員高效地編寫重複性任務的代碼,而不必反覆編寫相同的操作。

behind all of the software that we use on a daily basis.

我們日常使用的所有軟件的背後。

字幕與單字
由 AI 自動生成

單字即點即查 點擊單字可以查詢單字解釋