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

Launching the Python interpreter via the Linux Terminal

It is also possible to use the Python interpreter via the Linux Terminal. Programmers mostly use this to test their code or refer to the Python documentation tool, pydoc. This approach is convenient if the readers plan to use a text editor other than IDLE:

  1. Launch the Raspberry Pi's command-line terminal from the desktop toolbar.

Launching the command-line terminal

  1. Type the command,python3 and press EnterThis should launch Python 3.x on the terminal.
  2. Now, try running the same piece of code discussed in the previous section:
       print("I am excited to learn Python with the Raspberry Pi Zero")

This would give the following screenshot as the result:

The result should be similar to that of the previous two sections

The Python interpreter in the Linux Terminal may be closed by typing exit() and pressing the return key

主站蜘蛛池模板: 尖扎县| 南江县| 永福县| 从化市| 巴林右旗| 甘孜县| 勃利县| 南阳市| 芒康县| 平凉市| 平谷区| 曲阳县| 正镶白旗| 浦东新区| 阳信县| 彭州市| 克什克腾旗| 慈利县| 凤翔县| 凤翔县| 北流市| 乐平市| 锡林郭勒盟| 德令哈市| 酒泉市| 南丹县| 周宁县| 嘉黎县| 汝州市| 沈丘县| 大石桥市| 洪雅县| 永嘉县| 大足县| 宝清县| 都安| 年辖:市辖区| 文化| 揭阳市| 山东省| 油尖旺区|