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

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.

主站蜘蛛池模板: 武义县| 长春市| 交城县| 拉萨市| 叙永县| 佛山市| 江陵县| 理塘县| 德昌县| 息烽县| 临湘市| 周口市| 绥化市| 饶阳县| 津市市| 土默特右旗| 启东市| 吴忠市| 涟源市| 辽中县| 旬阳县| 桃江县| 奇台县| 同江市| 蓬莱市| 亚东县| 锦州市| 玉山县| 衡阳县| 汶上县| 灌阳县| 西和县| 扎赉特旗| 壤塘县| 庆阳市| 博客| 江山市| 泰兴市| 青阳县| 电白县| 偃师市|