Читать книгу Algorithms For Dummies - John Paul Mueller, John Mueller Paul, Luca Massaron - Страница 69
Performing Common Tasks
ОглавлениеMost tasks in Colab and Notebook work the same. Each has both code cells and noncode cells, and you can create code cells in both Colab and Notebook by using the options on the Insert menu. Likewise, both environments have noncode cells that come in three forms:
Text
Section header
Form field, which comes in these types:DropdownInputSliderMarkdown
Noncode cells in Colab work somewhat differently from the Markdown cells found in Notebook, but the idea is the same. Two interesting additions in Colab that aren’t found in Notepad are the scratch code cell, which allows you to experiment with code in real time, and code snippets, which are canned code for performing specific tasks (you just insert them where needed).
You can also edit and move cells. One important difference between the two environments is that you can’t change a cell type in Colab, but you can in Notebook. A cell that you create as a section header can’t suddenly transform into a code cell. The following sections offer a brief overview of the various features.