官术网_书友最值得收藏!

How does it look when we execute scripts?

If we were to provide a name for the notebook, enter a simple Python script, and execute the notebook cells, we would see a display like this:

The script is:

name = "Dan Toomey"
state = "MA"
print(name + " lives in " + state)

We assign a value to the name and state variables and then print them out.

If you notice, I have placed the statements into two different cells. This is just for readability. They could all be in the same cell or three different cells.

There are line numbers assigned to each cell. The numbering always starts at 1 for the first cell, then as you move cells around the numbering may grow (as you can see the first cell is labeled cell 2 in the display).

Below the second cell, we have non-editable display results. Jupyter always displays any corresponding output of a cell just below. This could include error information as well.

主站蜘蛛池模板: 香港| 登封市| 旅游| 游戏| 涡阳县| 东光县| 方山县| 罗山县| 兴仁县| 松阳县| 延边| 绥德县| 施甸县| 濉溪县| 三门县| 依安县| 洛扎县| 仪陇县| 安国市| 增城市| 建湖县| 福泉市| 安庆市| 蓬溪县| 正定县| 墨玉县| 沁源县| 婺源县| 阳江市| 修文县| 敦煌市| 延边| 手机| 东港市| 洛阳市| 饶阳县| 浮山县| 宁河县| 同仁县| 东兰县| 新龙县|