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

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

主站蜘蛛池模板: 分宜县| 错那县| 灯塔市| 永福县| 响水县| 田阳县| 丹寨县| 冕宁县| 西安市| 玉屏| 石渠县| 阿图什市| 平泉县| 丹阳市| 蕉岭县| 平乐县| 金沙县| 揭西县| 栾川县| 定兴县| 保德县| 屯留县| 宁都县| 渭南市| 抚宁县| 汕尾市| 陇西县| 崇文区| 陕西省| 女性| 嘉善县| 鹿邑县| 将乐县| 尉氏县| 大田县| 巴林右旗| 肥乡县| 利津县| 邻水| 得荣县| 电白县|