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

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

主站蜘蛛池模板: 盖州市| 阜平县| 绥化市| 那坡县| 云南省| 武穴市| 沂源县| 望都县| 翁源县| 南城县| 遵化市| 会理县| 新昌县| 榆社县| 宁明县| 唐海县| 辰溪县| 营口市| 肇庆市| 满洲里市| 名山县| 综艺| 平湖市| 中山市| 镇雄县| 潢川县| 华坪县| 寻甸| 蒙阴县| 永顺县| 宝鸡市| 大兴区| 和龙市| 洛阳市| 泗水县| 大英县| 梧州市| 广汉市| 崇义县| 农安县| 铜山县|